2

I'm using Low Search on my site and it's not displaying all results. I've rebuilt the index and lexicon. I'm testing this with one product. If I go to the products page I see product but if I try and search for it, no result for the title. Here is the code for the results page.

{exp:low_search:results
                    query="{segment_3}"
                    channel="products"
                    limit="15"
                    name="range:tags"
                    dynamic="off" 
                    orderby="release_date" 
                    sort="desc"
                }

                  {if count == 1}
                    <p>
                    Searched for <strong>{low_search_keywords}</strong>.
                    Search results: <strong>{absolute_results}</strong>
                    </p>
            {/if}

                {if count==1}<ul class="thumbnails">{/if}
                    {switch="<div class='row'>||"}
                    <li class="span3">                      

                <div class="thumbnail">
                    {if product_thumbnail}
                            <a class='' href="{entry_id_path='{template_group}/product_detail'}"><img src="{product_thumbnail}" /></a>
                    {if:else}
                    <a class='' href="{entry_id_path='{template_group}/product_detail'}"><img src="http://placehold.it/300x200" alt=""></a>
                    {/if}
                    <div class="caption">
                        <h4>{title}</h4>
                    </div>
                </div>
                </li>
                {switch="||</div>"}
                    {if count==total_results}</ul><!-- end row -->{/if}
                    {paginate}
                        <p>Page {current_page} of {total_pages} pages {pagination_links}</p>


                     {if previous_page}
        <a href="{auto_path}">Previous Page</a> &nbsp;
    {/if}
    {if next_page}
        <a href="{auto_path}">Next Page</a>
    {/if}
                    {/paginate}

                    {if no_results}
                        <p>Sorry, nothing found.</p>
                    {/if}
                {/exp:low_search:results}

Any idea what I'm doing wrong?

5

If Low Search is giving no or not all results, check the following things:

Native default parameter values negating search results

The Results tag extends the native channel:entries tag, so default filtering is in place:

  • status will be limited to open only;
  • show_future_entries will be set to no;
  • show_expired will be set to no.

In 9 out of 10 cases, the status is not explicitly given, so only open entries are shown.

Searchable fields are not weighted

For Keyword searches, the keywords must be present in the index. For words to be present in the index, the fields must have weight of at least 1. In order to give fields weight, create a collection for it. In order for a field to show up in the collection details, it must be marked as Searchable in the field settings.

Very small amount of data in the index

The way keyword searches work (or to be more precise, MySQL full-text searches), means keywords shouldn't be "common". They are considered common if they appear in more than half of the index. Usually, this isn't a problem at all. However, when you're just setting up a site, and you have very few entries indexed with the same keywords, it's possible those keywords are considered common by MySQL, and will therefore not match a search query. Having more data/entries will solve the problem.

Other trouble shooting tips

Low Search uses the Template Debugger extensively. If you're getting unexpected results, turn it on, and look up any lines that mention Low Search or low_search. That should give you some more insight as to what is going on.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.