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

Support archive

search returning entries not in collection

Melissa 2 Nov 2015 21:56 problem, pending

Hi,

I'm new to using low search, so this might be how it works. I have multiple collections and I wanted to list the results by collection. So I'm using this code on the results page:


{exp:low_search:results collection="destinations" query="{segment_2}" loose_ends="both"}
{if count == 1}<h2>Destination</h2>{/if}
<h2><a href="{url_title_path="destination'}">{title}</a></h2>
{/exp:low_search:results}

{exp:low_search:results collection="cruise" query="{segment_2}" loose_ends="both"}
{if count == 1}<h2>Cruises</h2>{/if}
<h2><a href="{url_title_path='cruises'}">{title}</a></h2>
{/exp:low_search:results}

{exp:low_search:results collection="tours" query="{segment_2}" loose_ends="both"}
{if count == 1}<h2>Tours</h2>{/if}
<h2><a href="{url_title_path='tours'}">{title}</a></h2>
{/exp:low_search:results}


The first listing for Destination shows 1 result, which is correct.

For cruise and tours, I get results from other collections. For example, under cruise, I get the 1 result for destinations, and then other results that are cruises, tours, events, and blog entries.

Also, the original results tag was using: search_mode="all" - but I removed that to see if it would change anything and it did not.

Thanks for any help!

Mel

Replies

  1. Low 2 Nov 2015 22:31

    What are your PHP, EE and LS versions?
    Also, can you copy/paste the output of the template debugger here; all lines mentioning Low Search?

  2. Melissa 2 Nov 2015 22:44

    EE 2.7.2
    LS 3.0.4
    PHP 5.6.10

    --------

    Calling Class/Method: Low_search/results
    (1.010407 / 22.39MB) -> Class Called: Low_search
    (1.010704 / 22.40MB) -> Method Called: results
    (1.011104 / 22.37MB) Low Search: Applying Low_search_filter_keywords
    (1.012601 / 22.21MB) Low Search: Starting search (fallback)
    (1.146469 / 22.22MB) Low Search: Calculating relevance score
    (1.456121 / 22.47MB) Low Search: Applying collection modifier to search results
    (1.461670 / 22.38MB) Low Search: Setting fixed_order param
    (1.462037 / 22.38MB) Low Search: Parameters set: loose_ends="both" collection="location_destinations|location_regions|cruise|events|tours|blogs|accomodations" search_mode="all" limit="1" keywords="san francisco" orderby="" sort="" fixed_order="32384|39225|39007|569|843|39144|1152|584|38257|987|38256|1235|990|251|1063|399|33578|113|633|1237|641|118|981|38189|104|639|1088|349|38267|38220|6|334|241|343|38993|724|640|39305|842|853|1097|1258|995|71|131|894|38238|906|38998|39080|1120|38239|39|1090|162|38191|862|495|38959|280|38678|283|721|38243|100|38535|38209|44|141|1143|696|1264|1138|157|434|866|315|454|452|39124|728|38234|595|205|60|39155|7|666|25|938|272|927|45|38973|185|871|329|285|485|255|466|38648|1043|1004|38630|121|707|1076|1236|344|215|973|265|39120|634|85|327|915|816|824|38885|38898|38277|147|222|750|257|560|499|345|39065|1136|1196|1230|795|38225|468|293|859|366|993|210|163|208|404|616|38896|803|433|302|841|1083|621|753|38497|39316|851|38200|779|1151|487|67|398|1192|39078|1173|815|361|925|19|377|1240|1245|38259|363|607|38282|1255|626|161|1070|856"
    (1.462057 / 22.38MB) Low Search: Pre-applying search vars to tagdata
    (1.462537 / 22.38MB) Low Search: Calling the channel module
    (1.473673 / 22.52MB) Calling Extension Class/Method: Assets_ext/channel_entries_query_result
    (1.474541 / 22.52MB) Calling Extension Class/Method: Low_search_ext/channel_entries_query_result
    (1.479762 / 22.77MB) Calling Extension Class/Method: Playa_ext/channel_entries_tagdata
    (1.480416 / 22.77MB) Calling Extension Class/Method: Matrix_ext/channel_entries_tagdata
    (1.485754 / 22.38MB) -> Data Returned
    (1.485821 / 22.38MB) Calling Class/Method: Low_search/results
    (1.486256 / 22.38MB) -> Class Called: Low_search
    (1.486509 / 22.38MB) -> Method Called: results
    (1.486840 / 22.36MB) Low Search: Applying Low_search_filter_keywords
    (1.487936 / 22.22MB) Low Search: Starting search (fallback)
    (1.491082 / 22.22MB) Low Search: Calculating relevance score
    (1.491247 / 22.22MB) Low Search: Applying collection modifier to search results
    (1.491334 / 22.22MB) Low Search: Setting fixed_order param
    (1.491571 / 22.22MB) Low Search: Parameters set: collection="location_destinations|location_regions" search_mode="all" loose_ends="both" keywords="san francisco" orderby="" sort="" fixed_order="32384"
    (1.491587 / 22.22MB) Low Search: Pre-applying search vars to tagdata
    (1.492233 / 22.22MB) Low Search: Calling the channel module
    (1.498471 / 22.36MB) Calling Extension Class/Method: Assets_ext/channel_entries_query_result
    (1.522882 / 22.36MB) Calling Extension Class/Method: Low_search_ext/channel_entries_query_result
    (1.535232 / 22.66MB) Calling Extension Class/Method: Playa_ext/channel_entries_tagdata
    (1.536270 / 22.66MB) Calling Extension Class/Method: Matrix_ext/channel_entries_tagdata
    (1.543854 / 22.27MB) -> Data Returned
    (1.543928 / 22.27MB) Calling Class/Method: Low_search/results
    (1.544147 / 22.27MB) -> Class Called: Low_search
    (1.544440 / 22.27MB) -> Method Called: results
    (1.544737 / 22.27MB) Low Search: Applying Low_search_filter_keywords
    (1.545687 / 22.27MB) Low Search: Starting search (fallback)
    (1.787966 / 22.26MB) Low Search: Calculating relevance score
    (2.067781 / 22.44MB) Low Search: Setting fixed_order param
    (2.068104 / 22.44MB) Low Search: Parameters set: collection="accomodations" keywords="san francisco" search_mode="all" orderby="" sort="" fixed_order="32384|39225|33330|33434|33329|33433|569|33331|33157|39007|32752|843|32945|39144|1152|33042|33192|584|38257|38256|1235|990|987|1063|399|33578|113|633|33334|1237|641|118|38286|33348|104|639|33041|38267|981|6|349|241|334|38993|33190|640|842|853|1097|995|38220|251|906|1120|39080|894|1090|343|38238|38191|862|38239|38998|495|71|38678|38583|36749|100|38535|38209|39305|280|38243|724|1138|162|141|434|866|454|1143|32859|157|33426|452|39124|728|38234|595|39155|38959|283|33177|696|938|1264|871|38189|255|131|1043|1004|7|33327|44|38630|707|1076|666|315|1236|215|32736|185|634|60|39|38648|33023|38949|344|33055|973|38885|38898|1088|38277|147|222|329|257|560|39120|32997|25|345|39065|1136|121|285|1230|85|915|468|859|205|993|45|210|750|327|816|499|803|433|33289|272|841|33078|753|38497|39316|851|795|265|38200|779|1151|487|404|67|398|721|1192|39078|815|38225|1083|616|361|38896|925|208|377|293|1240|1245|621|1173|363|1196|626|19|1070|38259|607|38282|1255|302|161|856"
    (2.068130 / 22.44MB) Low Search: Pre-applying search vars to tagdata
    (2.068652 / 22.44MB) Low Search: Calling the channel module

    -----

    (2.807687 / 33.58MB) Calling Class/Method: Low_search/results
    (2.808069 / 33.58MB) -> Class Called: Low_search
    (2.808573 / 33.58MB) -> Method Called: results
    (2.809141 / 33.55MB) Low Search: Applying Low_search_filter_keywords
    (2.810783 / 33.40MB) Low Search: Starting search (fallback)
    (2.966354 / 33.39MB) Low Search: Calculating relevance score
    (3.287592 / 33.58MB) Low Search: Setting fixed_order param
    (3.287941 / 33.59MB) Low Search: Parameters set: collection="cruise" loose_ends="both" keywords="san francisco" search_mode="all" orderby="" sort="" fixed_order="32384|33434|39225|33330|39007|33329|33433|569|33331|33157|32752|843|32945|33042|39144|1152|33192|584|38257|987|38256|1235|990|251|1063|32736|399|33578|113|33348|633|33334|1237|641|118|38286|981|38189|104|639|1088|349|33041|38267|38220|6|334|241|343|38993|33190|724|640|39305|842|853|1097|1258|995|71|131|894|38238|906|38998|39080|1120|38239|39|1090|162|38191|862|495|38959|280|38678|283|721|38583|38243|36749|100|38535|38209|44|33078|141|1143|696|1264|1138|157|434|866|315|454|32859|33426|452|39124|728|38234|595|205|60|39155|7|666|33177|25|938|272|927|45|38973|871|185|329|285|485|255|466|38648|1043|1004|33327|38630|121|707|1076|1236|344|215|973|265|39120|634|33023|85|327|38949|915|816|33055|824|38885|38898|38277|147|222|750|257|560|499|32997|345|39065|1136|1196|1230|795|38225|468|293|859|366|993|210|163|208|404|616|38896|803|433|33289|302|841|1083|621|753|38497|39316|851|38200|779|1151|487|67|398|1192|39078|1173|815|361|925|19|377|1240|1245|38259|363|607|38282|1255|626|161|1070|856"
    (3.287962 / 33.59MB) Low Search: Pre-applying search vars to tagdata
    (3.288519 / 33.59MB) Low Search: Calling the channel module
    (3.375976 / 45.22MB) Calling Extension Class/Method: Assets_ext/channel_entries_query_result
    (3.376900 / 45.23MB) Calling Extension Class/Method: Low_search_ext/channel_entries_query_result

    -----

    Calling Class/Method: Low_search/results
    (4.271449 / 35.03MB) -> Class Called: Low_search
    (4.271756 / 35.03MB) -> Method Called: results
    (4.272124 / 35.00MB) Low Search: Applying Low_search_filter_keywords
    (4.273438 / 34.84MB) Low Search: Starting search (fallback)
    (4.276657 / 34.83MB) Low Search: Searched but found nothing. Returning no results.
    (4.276793 / 34.83MB) Low Search: Filters found no matches, returning no results
    (4.276899 / 34.83MB) Returning No Results Content
    (4.277117 / 34.83MB) -> Data Returned
    (4.277305 / 34.83MB) Calling Class/Method: Low_search/results
    (4.277518 / 34.83MB) -> Class Called: Low_search
    (4.277795 / 34.83MB) -> Method Called: results
    (4.278103 / 34.83MB) Low Search: Applying Low_search_filter_keywords
    (4.280492 / 34.83MB) Low Search: Starting search (fallback)
    (4.283133 / 34.83MB) Low Search: Calculating relevance score
    (4.287563 / 34.83MB) Low Search: Setting fixed_order param
    (4.287824 / 34.84MB) Low Search: Parameters set: collection="events" loose_ends="both" keywords="san francisco" search_mode="all" orderby="" sort="" fixed_order="39225|33578|38535|38648"
    (4.287843 / 34.84MB) Low Search: Pre-applying search vars to tagdata
    (4.288312 / 34.84MB) Low Search: Calling the channel module
    (4.290221 / 34.85MB) Returning No Results Content
    (4.290303 / 34.84MB) Returning No Results Content
    (4.290439 / 34.83MB) -> Data Returned
    (4.290516 / 34.83MB) Calling Class/Method: Low_search/results
    (4.290753 / 34.83MB) -> Class Called: Low_search
    (4.291029 / 34.83MB) -> Method Called: results
    (4.291332 / 34.83MB) Low Search: Applying Low_search_filter_keywords
    (4.292324 / 34.83MB) Low Search: Starting search (fallback)
    (4.407641 / 34.84MB) Low Search: Calculating relevance score
    (4.687773 / 35.00MB) Low Search: Setting fixed_order param
    (4.688314 / 35.01MB) Low Search: Parameters set: collection="blogs" loose_ends="both" keywords="san francisco" search_mode="all" orderby="" sort="" fixed_order="39007|569|843|39144|1152|584|38257|987|38256|1235|990|251|1063|399|113|633|1237|641|118|981|38189|104|639|1088|349|38267|38220|6|334|241|343|38993|724|640|39305|842|853|1097|1258|995|71|131|894|38238|906|38998|1120|39080|38239|39|1090|162|38191|862|495|38959|280|38678|283|721|38243|100|38209|44|141|1143|696|1264|1138|157|434|866|315|454|452|39124|728|38234|595|205|60|39155|7|666|25|938|272|927|45|38973|871|185|329|285|485|255|466|1043|1004|38630|121|707|1076|1236|344|215|973|265|39120|634|85|327|915|816|824|38885|38898|38277|147|222|750|257|560|499|345|39065|1136|1196|1230|795|38225|468|293|859|366|993|210|163|208|404|616|38896|803|433|302|841|1083|621|753|38497|39316|851|38200|779|1151|487|67|398|1192|39078|1173|815|361|925|19|377|1240|1245|38259|363|607|38282|1255|626|161|1070|856"
    (4.688359 / 35.00MB) Low Search: Pre-applying search vars to tagdata
    (4.688975 / 35.01MB) Low Search: Calling the channel module
    (4.840554 / 46.63MB) Calling Extension Class/Method: Assets_ext/channel_entries_query_result
    (4.841618 / 46.64MB) Calling Extension Class/Method: Low_search_ext/channel_entries_query_result

  3. Low 2 Nov 2015 22:47

    Can you try and upgrade Low Search to the latest version, and then rebuild your indexes?

  4. Melissa 2 Nov 2015 23:27

    Thanks. I've inherited this site, so I need to track down the license. I'll be back with any further issues.