Search results no longer working since 3.0.0 update
Hi -
I just updated to 3.0.0 and this query, which I use to simply search entry titles, no longer works: where am I going wrong?
[
{exp:low_search:results channel="courses" search:title="{segment_3}" dynamic="no" disable="member_data|category_fields"}
{
"id": {exp:json_encode}{entry_id}{/exp:json_encode},
"page_uri": {exp:json_encode}{page_uri}{/exp:json_encode},
"value": {exp:json_encode}{title}{/exp:json_encode} }{if count<absolute_results}, {/if}
{/exp:low_search:results}
]
Also while I have your attention, how can I make the search fuzzy, in that "a levels" would return the same as "a-levels" or is that not possible?
Thanks!
Dan.
Replies
Low 13 Nov 2013 11:48
Ah, found it. To fix, open up /libraries/Low_search_params.php and look up line #112. Change that from
to this:
As for the fuzzy search, that only works for the Keywords filter. You're using the Field Search filter, which is (partially) native to EE, and uses literal strings. You could use the Keywords filter instead. Then create a collection where you only add weight to the Title field. Then you could use collection="title_collection" keywords="{segment_3}" instead.
Daniel Howells 13 Nov 2013 12:49
Awesome - that works, but I might be missing something here but how could I match - for example - "throw" with "throwing" - can't find it in the docs?
Low 13 Nov 2013 12:52
If you're using the Keywords filter, you'll need the loose_ends parameter.
When using the Field Search filter (see its params here), substring matches are the default, but you can change that by using the syntax EE uses natively.
Daniel Howells 13 Nov 2013 13:31
Bingo - thanks