Forward Slash In Field Breaking Search
Hi,
When searching across fields that have a forward slash "/", no keywords after the forward slash are pulled into the search results.
For Example:
Title field: Nike/Adidas Page
Nike will show in the search results. Adidas will not show.
If I've done something wrong, please let me know.
Thanks!
Replies
Low 28 Sep 2011 06:26
Ah, that would be because the slash is stripped out. Couple of ways around it:
- Add space(s) around the slash in your title field
- Enable loose ends in your search
- If you're running Low Search 1.0.6, open up low_search/helpers/low_search_helper.php in a text editor and change line #111 to
$chars[low_chr($k)] = ' ';
(with a space between the single quotes)JS 28 Sep 2011 15:04
Hi Low,
Using all 3 of the steps above, it worked.
I wish Low Search had the functionality, with only loose ends enabled, to accomplish this without modifying entries and code... since I will probably update the module in the future and forget the modify the php file.
Thanks for the help.
Low 28 Sep 2011 15:32
Cool, glad it's working.
Note that any one of the three options I listed should solve the issue; you don't need to implement all three.
I'll probably look into working the third option in the core.
JS 28 Sep 2011 15:46
Loose ends were enabled before I contact support. Not 100% sure, but I don't think the spacing in the titles was working until the code modification was complete. Since I completed the code step last, I'm not sure if it would have worked independently, but all 3 do work together.
Thanks again.