Not Getting The Correct Results
Inside of an Editor body Low Search is only finding about half the words. A simple link shows Forwarding Address it will not find "Forwarding" in the entry. However the next line is Other Text and a search for "Other Text" will find it. Even searching just "Other".
Replies
Low 9 May 2014 07:21
You can look in the database: look up the entry in exp_low_search_indexes and see what the actual processed text looks like. Then you can try and look up the query generated by LS, which can be found in the output profiler. You can try and run that query on its own to see if it should return entries.
Or I could just take a look myself, for which I'd need SuperAdmin login creds.
Brad Parscale 9 May 2014 18:29
Low,
I see this at the top of the db field:
| forms | | student forms doctor of philosophy formsform 30 dissertation proposal committee approvalform 32 phd admission to candidacyform 40 request for final defenseform 43 phd report on final oralbindingcopyright disclaimerforwarding addresslibrary copyright permissionsurvey of earned doctoratesmaster of science
I see forwarding address but it appears to be jammed together with disclaimer?
Brad
Brad Parscale 9 May 2014 18:34
Low,
So if you add text in an editor in this way:
<a href="">This Text</a><br><a href="">This other text</a>
The Db stores this as:
This TextThis other text. Redactor automatically puts that all together so there is no white space.
Brad
Low 10 May 2014 07:28
LS strips all html tags, so if there's no white space, the text is put together.
I guess, before stripping the tags, LS could replace <br>s to newlines, so whitespace is introduced there. That won't solve the issue if you also save content like so: <p>lorem ipsum</p><p>Dolor sit amet</p>, which will result in "ipsumdolor" if no punctuation is used.
Will look at replacing the <br>s for now.
Brad Parscale 10 May 2014 16:08
Low,
Editor will not do that. Redactor always puts the
. The only issue I am seeing is that br doesn't produce white space and it really should.
Brad
Low 10 May 2014 16:57
LS will remove html tags, simply by calling strip_tags(). If Editor saves its html without spaces in between tags, no spaces exist between words when html tags are stripped out.
If you open up low_search/helpers/low_search_helper.php and go to line 219, that should read:
Above that, add this:
...and rebuild your index. Does that help?
Brad Parscale 10 May 2014 23:24
Low,
Appears to fix the issue. Thanks.
Brad
Low 15 May 2014 07:28
This was added to LS v3.1.5.