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

Support archive

Low Search Results not returning any entries

ScottBoyde 6 Aug 2015 12:02 question, complete

I am using low search to limit the results depending on a custom field.

I have created a collection called news and indexed on News Club and News Club Url fields.

I have added an entry in news channel and entered in data into these two fields.

I have the following template tag.

{exp:low_search:results
channel="news"
limit="2"
collection="news"
search:news_club_url="{segment_3}"
status="open|pending|closed"
}

{title}

{/exp:low_search:results}

I believe I had this working some time ago but development on this part of my site was put on hold. Now working on this again an I am not sure why this is not returning any results.

Replies

  1. Low 6 Aug 2015 12:11

    You only need to set up collections if you're using the Keywords filter.

    As for why you're not getting any results, please provide the following:

    - EE, LS and PHP versions.
    - Your full Form and Results tags (You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.)
    - The output of the Template Debugger (or at least all the lines that mention Low Search)
    - An example of a URI that triggers the No Results.

  2. ScottBoyde 6 Aug 2015 12:27

    I have a vague recollection of discussing this before but cant seem to find any reference from it an may have taken it wrong that I needed to use collections.

    I am using

    EE 2.9.2
    LS 4.3.1
    PHP 5.4.39

    Results Tags
    http://pastebin.com/SubRereK

    Template Debugger
    http://pastebin.com/Q4ev1kzc

    http://www.nifootball.co.uk/club/fc-u...

  3. Low 6 Aug 2015 12:33

    Looking at the template debugger, the full opening tag for the Results tag is this:

    {exp:low_search:results channel="news" limit="2" collection="news" search:news_club_url="fc-united-lisburn-football-club" }


    Note that the status="" parameter is not set, so it will default to status="open", like the native channel:entries tag.

    Further on, the debugger says:

    Parameters set: channel="news" limit="2" collection="news" search:news_club_url="fc-united-lisburn-football-club" entry_id="58351"


    Which means that an entry *is* found and set (entry #58351) before the native channel:entries tag is called, and after which the No Results is triggered.

    It probably means the entry is not shown because of other parameters that are not set on the tag. Most likely status, but possibly show_future_entries or show_expired.

  4. ScottBoyde 6 Aug 2015 14:05

    I added the status and show_future_entries or show_expired and still the same result.

     
    (0.600056 / 4.04MB) Low Search: Parameters set: channel="news" limit="2" collection="news" search:news_club_url="fc-united-lisburn-football-club" status="open|pending|closed" show_future_entries="yes" show_expired="yes" entry_id="58351|58352"

  5. Low 6 Aug 2015 14:07

    What happens if you add dynamic="no" to the tag? Even though LS sets that automatically, it might make a difference.

  6. ScottBoyde 6 Aug 2015 14:45

    That works