Setting keywords mode to search character "-"
Hi Low,
I have 3 entries with title:
- Product srt6350
- Product srt6350
- Product SRT-5100
I using this:
{exp:low_search:results keywords="{segment_3}" keywords:mode="all" keywords:loose="right"...}
Search "srt", the results only return 2 first entries:
- Product srt6350
- Product srt6350
The product Product SRT-5100 not return. If I want search this product, I have to search all string "SRT-5100".
I want search "srt", Low Search results all 3 entries above.
Thank so much!
Replies
Low 15 Sep 2018 07:53
The keywords filter effectively only searches letters (and digits). Any punctuation is ignored. This is not a setting you can disable/enable; it's by design.
That said, all three entries *should* be returned with those settings; check the template debugger for lines that mention Low Search for more clarity as to what's going on.
Also, if you're searching for substrings, you might be better off using the Field Search filter instead.
ngoncom 16 Sep 2018 15:59
Hi,
I using field search (search:title=""} and Low Search results 3 entries as my expect, thank Low!
But I have a small problem, now I cant highlight the keywords using this:
{low_search_excerpt} now return the field I setting in channel (it cant choose title as excerpt) not the field I setting in Low Search (title as excerpt).
Thank Low!
Low 17 Sep 2018 10:18
Highlighting is only available in keyword searches, I'm afraid.
But as I mentioned, the keywords filter *should* return all three items. You can check the exp_low_search_indexes table to see what exactly is stored in the index database for each of those entries, and you can enable the template debugger/output profiler to see what queries are generated and which results are returned. What does that tell you?