No results for multiple collections query
Hi, I have a problem after upgrading from version 2.1.0 to 2.3.1. The form queries two collections but returns no results:
{exp:low_search:form site="default_site" collection="collection1|collection2" result_page="results" secure="no" }
...
{/exp:low_search:form
{exp:low_search:results query="{segment_2}" status="open" limit="10" }
...
{/exp:low_search:results}
Here's the log:
(0.011850 / 7.89MB) - Beginning Tag Processing -
(0.011869 / 7.88MB) Parsing Tags in Template
(0.011893 / 7.88MB) Tag: {exp:low_search:keywords query="eyJjb2xsZWN0aW9uIjoiQ29uY2VwdHN8Q2lwc0RvY3VtZW50cyIsInJlc3VsdF9wYWdlIjoicmVzdWx0cyIsInNpdGUiOiJkZWZhdWx0X3NpdGUiLCJrZXl3b3JkcyI6ImJyYW5kIn0"}
(0.011953 / 7.89MB) No Closing Tag
(0.012003 / 7.89MB) Tag: {exp:low_search:results query="eyJjb2xsZWN0aW9uIjoiQ29uY2VwdHN8Q2lwc0RvY3VtZW50cyIsInJlc3VsdF9wYWdlIjoicmVzdWx0cyIsInNpdGUiOiJkZWZhdWx0X3NpdGUiLCJrZXl3b3JkcyI6ImJyYW5kIn0" status="open" limit="10" }
(0.012062 / 7.89MB) Closing Tag Found
(0.012128 / 7.89MB) Tag: {exp:channel:categories site="default_site" channel="concepts" style="linear" }
(0.012177 / 7.89MB) Closing Tag Found
(0.012213 / 7.89MB) Processing Tags
(0.012236 / 7.90MB) Module Tag: Low_search/keywords
(0.012254 / 7.90MB) Module Tag: Low_search/results
(0.012270 / 7.90MB) Module Tag: Channel/categories
(0.012283 / 7.90MB) Including Files for Plugins and Modules
(0.022679 / 10.07MB) Files for Plugins and Modules All Included
(0.023075 / 10.10MB) Beginning Final Tag Data Processing
(0.023101 / 10.10MB) Calling Class/Method: Low_search/keywords
(0.023189 / 10.10MB) -> Class Called: Low_search
(0.029151 / 10.82MB) -> Method Called: keywords
(0.029547 / 10.83MB) Low Search: Valid query found
(0.029633 / 10.83MB) -> Data Returned
(0.029662 / 10.82MB) Calling Class/Method: Low_search/results
(0.030102 / 10.82MB) -> Class Called: Low_search
(0.030429 / 10.83MB) -> Method Called: results
(0.039384 / 10.97MB) Low Search: Starting search (fulltext)
(0.041364 / 11.01MB) Low Search: Applying collection modifier to search results
(0.041659 / 11.01MB) Low Search: Caching search results
(0.041689 / 11.01MB) Low Search: Setting fixed_order parameter
(0.041784 / 11.02MB) Low Search: Calling the channel module
(0.072403 / 14.93MB) Returning No Results Content
(0.072448 / 14.91MB) Returning No Results Content
(0.072578 / 14.82MB) -> Data Returned
(0.072617 / 14.81MB) Calling Class/Method: Channel/categories
(0.072953 / 14.81MB) -> Class Called: Channel
(0.073263 / 14.82MB) -> Method Called: categories
(0.106389 / 15.66MB) -> Data Returned
(0.106520 / 15.55MB) - End Tag Processing -
Thanks
Replies
Low 30 Aug 2013 13:05
Are you using the MSM? If so, are you pulling search results from site 1 to site 2?
Also, the search does produce results (as seen in the log: "Setting fixed_order parameter", which only happens when keyword search results are there). The No Results is triggered by the channel:entries module behind the scenes, which indicates all found results are filtered out by other parameters. Could be status, or show_future_entries, or show_expired, or maybe the site parameter.
neilkb 30 Aug 2013 13:11
Sorry yes I forgot to mention that I'm using MSM and the results are pulling from the core site to a sub-site. Thanks for clarifying, I thought it could have been returning results from the module, I will check other parameters.
Low 30 Aug 2013 13:13
If you're not letting the user change the collection in the search form, you can also consider moving both the collection="" and site="" parameters to the Results tag, hard-coding them. That will also result in slightly shorter query URIs.
neilkb 30 Aug 2013 13:27
Low you're a star, thank you! Moving the collection="" and site="" to the Results tag worked. I'm unsure as to what has changed between versions to cause this as the templates that we are using haven't changed. We upgraded EE 2.5.3 to 2.6.1 and Lowsearch 2.1.0 to 2.3.1, any ideas?
Low 30 Aug 2013 13:29
Well, there have been some changes in the way the site="" parameter works, but in my tests, everything worked fine. Anyways, having parameters like that in the Results tag is best practice anyway. :)
neilkb 30 Aug 2013 13:43
OK thanks for your help and fast response, really appreciate that as we have 70k users on the site! :)