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

Support archive

no results showing for a collection

stevieg_83 26 Jun 2014 14:58 problem, rejected

Hey Low,
We're struggling with Low Search on this particular project.

Previous dev had failed to set custom fields as searchable for a given channel. Rectified that and then created our collection, set the weight etc. Rebuilt the index and then searched for 'Hawaii' which is in the entry title of one of our entries.

That entry is both open and isn't in the future but yet search results returned null.

We stripped back the search and results just to have

{exp:low_search:form result_page="search/results" collection="events" form_class="search-form"}

Search
{/exp:low_search:form}

{exp:low_search:results query="{segment_3}" collection="events" limit="10"}
{if count == 1}

    {/if}
  1. {title}

  2. {if count == total_results}
{/if}
{if no_results}No search results{/if}
{/exp:low_search:results}

but that has no result either.

If we exclude the collection parameter, the results tag is returning entries from a channel that doesn't have a collection set.

What are we missing?

Cheers,
S

Replies

  1. stevieg_83 26 Jun 2014 14:59

    The entries are also showing as indexed in the db.

  2. Low 26 Jun 2014 15:02

    Can you re-post your Form tag? You can use http://pastie.org/ or http://pastebin.com/ for large chunks of code.

    Also, what's the URI for a search that doesn't give you the correct results? Finally, enable template debugging and copy/paste all lines mentioning Low Search here.

  3. stevieg_83 26 Jun 2014 15:18

    So the URL is /search/results/ containing this code

    https://gist.github.com/stevieg83/b12...

    The results tag initially gives no results. I'd have expected it to return 100 entries in that collection by default?

    When I search for hawaii, the url turns to /search/results/eyJyZXN1bHRfcGFnZSI6InNlYXJjaFwvcmVzdWx0cyIsImtleXdvcmRzIjoiSGF3YWlpIn0

    and finds nothing.

    Here's the template debugging https://gist.github.com/stevieg83/29b...

    interesting that fixed order returns 2 entry ids with the keyword we want.

  4. Low 26 Jun 2014 15:46

    The fact that the fixed_order param is set, implies that entries are found, but are negated by native filters/params like status etc. Can you think of any other params that might do that for those entries?

  5. stevieg_83 26 Jun 2014 15:59

    Oh man, he'd hidden the expiry date in publish layouts and I missed it.

    Sheesh! What a time suck.

    Thank you as always. Appreciated.