No results for a particular collection
I can't seem to get any search results from one of my collections.
When I use the Find & Replace, I can bring up results, but when I try using the template search, that collection doesn't bring up any results. I've tried making the Modifier up to 10 and rebuilding the index, but I still get 0 results.
Replies
Low 3 Jul 2013 07:32
The collection should have at least 1 field with weight > 0. Is that the case?
If so, then please post your Form tag here, along with the Results tag and the output of the Template Debugger for a no-results search query.
Use http://pastie.org for large chunks of code.
Noah 3 Jul 2013 15:27
Thanks for responding so quickly! Yup, I have the Title field weighted at 3, and yet when I search for words in titles of open entries, I don't get any results. Here's my code, as well as the Template Debugger output:
TEMPLATE DEBUGGING
(0.000017 / 2.62MB) - Begin Template Processing -
(0.001900 / 2.62MB) URI: search/eyJzZWFyY2hfbW9kZSI6ImFsbCIsImtleXdvcmRzIjoiV2Fsa2luZyJ9
(0.001921 / 2.62MB) Path.php Template: /
(0.001936 / 2.62MB) Retrieving Template
(0.001947 / 2.62MB) Parsing Template URI
(0.002678 / 2.62MB) Template Group Found: search
(0.003673 / 2.63MB) Retrieving Template from Database: search/index
(0.005808 / 2.63MB) Template Found
(0.007125 / 2.66MB) Retrieving Template from File
(0.023712 / 2.76MB) Calling Extension Class/Method: Low_variables_ext/template_fetch_template
(0.025499 / 2.73MB) Template Type: webpage
(0.025535 / 2.73MB) Parsing Site Variables
(0.025581 / 2.74MB) Snippets (Keys): freelancer_version|site_id|site_label|site_short_name|last_segment
(0.025596 / 2.74MB) Snippets (Values): FALSE|1|Covenant Life Church|default_site|eyJzZWFyY2hfbW9kZSI6ImFsbCIsImtleXdvcmRzIjoiV2Fsa2luZyJ9
(0.026119 / 2.74MB) Parse Date Format String Constants
(0.026188 / 2.74MB) Parse Current Time Variables
(0.026367 / 2.74MB) Parsing PHP on Input
(0.054732 / 2.74MB) Parsing Segment, Embed, and Global Vars Conditionals
(0.094009 / 2.77MB) - Beginning Tag Processing -
(0.094051 / 2.77MB) - End Tag Processing -
(0.094083 / 2.77MB) Processing Advanced Conditionals
(0.095099 / 2.77MB) - Processing Sub Templates (Depth: 1) -
(0.095131 / 2.77MB) List of Embeds: search/search_new
(0.095194 / 2.77MB) Processing Sub Template: search/search_new
(0.095247 / 2.77MB) Retrieving Template
(0.095265 / 2.77MB) Retrieving Template from Database: search/search_new
(0.098664 / 2.78MB) Template Found
(0.098769 / 2.78MB) Retrieving Template from File
(0.104127 / 2.80MB) Calling Extension Class/Method: Low_variables_ext/template_fetch_template
(0.104564 / 2.77MB) Template Type: webpage
(0.104596 / 2.77MB) Parsing Site Variables
(0.104637 / 2.77MB) Snippets (Keys): freelancer_version|site_id|site_label|site_short_name|last_segment
(0.104652 / 2.77MB) Snippets (Values): FALSE|1|Covenant Life Church|default_site|eyJzZWFyY2hfbW9kZSI6ImFsbCIsImtleXdvcmRzIjoiV2Fsa2luZyJ9
(0.104782 / 2.78MB) Parse Date Format String Constants
(0.104806 / 2.78MB) Parse Current Time Variables
(0.104839 / 2.78MB) Parsing Segment, Embed, and Global Vars Conditionals
(0.105277 / 2.76MB) - Beginning Tag Processing -
(0.105302 / 2.76MB) Parsing Tags in Template
(0.105343 / 2.76MB) Tag: {exp:low_search:form search_mode="all" query="eyJzZWFyY2hfbW9kZSI6ImFsbCIsImtleXdvcmRzIjoiV2Fsa2luZyJ9" required="keywords"}
(0.105438 / 2.77MB) Closing Tag Found
(0.105504 / 2.77MB) Tag: {exp:low_search:results loose_ends='both' collection='10' limit='200' query='eyJzZWFyY2hfbW9kZSI6ImFsbCIsImtleXdvcmRzIjoiV2Fsa2luZyJ9'}
(0.105571 / 2.77MB) Closing Tag Found
(0.105632 / 2.78MB) Processing Tags
(0.105676 / 2.78MB) Module Tag: Low_search/form
(0.105698 / 2.78MB) Module Tag: Low_search/results
(0.105714 / 2.78MB) Including Files for Plugins and Modules
(0.108673 / 2.87MB) Files for Plugins and Modules All Included
(0.109810 / 2.91MB) Beginning Final Tag Data Processing
(0.109839 / 2.91MB) Calling Class/Method: Low_search/form
(0.110014 / 2.92MB) -> Class Called: Low_search
(0.122998 / 3.18MB) -> Method Called: form
(0.126775 / 3.25MB) Low Search: Valid query found
(0.127284 / 3.26MB) -> Data Returned
(0.127328 / 3.25MB) Calling Class/Method: Low_search/results
(0.127472 / 3.25MB) -> Class Called: Low_search
(0.127678 / 3.26MB) -> Method Called: results
(0.135385 / 3.34MB) Low Search: Starting search (fallback)
(0.264830 / 3.34MB) Low Search: Calculating relevance score
(0.267556 / 3.41MB) Low Search: Applying collection modifier to search results
(0.267651 / 3.41MB) Low Search: Caching search results
(0.267699 / 3.41MB) Low Search: Setting fixed_order parameter
(0.267864 / 3.42MB) Low Search: Calling the channel module
(0.344343 / 5.02MB) Returning No Results Content
(0.344414 / 5.01MB) Low Search: Found low_search variables in no_results block, calling filters to parse
(0.344681 / 5.01MB) Low Search: Valid query found
(0.345178 / 5.00MB) -> Data Returned
(0.345297 / 4.96MB) - End Tag Processing -
(0.345319 / 4.96MB) Parsing PHP on Output
(0.345432 / 4.95MB) - End Template Processing -
(0.345448 / 4.95MB) Parse Global Variables
(0.367448 / 4.96MB) Template Parsing Finished
Memory Usage: 5,499,176 bytes
Low 3 Jul 2013 15:42
Looking at the debugger code, Low Search is finding entries before calling the native channel:entries tag to parse them. Most likely other filters are in place that causes the no-results to return.
So, do the entries you're expecting to turn up have status="open"?
Also, make sure their entry dates are not in the future or expired.
Noah 3 Jul 2013 16:09
Ah, since these are events that I'm searching, they're in the future. I added
show_future_entries='yes'
to the results and I'm now getting all results as expected. Thanks!Low 3 Jul 2013 16:12
Good. Also, I can recommend you change loose_ends='both' to either loose_ends='no' or loose_ends='right', which is better for performance. Substring searches are best for languages that don't use spaces or punctuation as word separators.
Noah 3 Jul 2013 17:38
Thank you very much for the suggestion!