All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Search results no longer working since 3.0.0 update

Daniel Howells 13 Nov 2013 11:34 problem, complete

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

  1. 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

    $this->_params = $this->_query = array();


    to this:

    $this->_params = array(); 
    $this->_query = NULL;


    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.

  2. 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?

  3. 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.

  4. Daniel Howells 13 Nov 2013 13:31

    Bingo - thanks