The Low Search reverse range filter doesn't seem to produce the correct results.
ISSUE: I can't seem to get LS to filter by the reverse range. I've tried submitting a date value before any of the expiration_date field values, but I still get all the records returned. I should get no results...I'm assuming. I've tried several date formats when submitting the input field, none seem to produce the expected result.
SET-UP: I have two separate EE date fields ("effective_date" & "expiration_date") The form field value is coming from an input field;
Both date fields have search enabled in the EE field settings.
EE Version: 2.11.9 (yes, we're far behind on our upgrading)
Low Search Version: 4.4.5
TEMPLATE CODE:
Here's some test template code I've tried using to experiment with which I pretty much just lifted from the LS doc:
{exp:low_search:form query="{segment_3}"
force_protocol="https"
form_id="search"}
Go
{/exp:low_search:form}
{exp:low_search:results
query="{segment_3}"
require_query="yes"
channel="exec_info_portal_content"
limit="10"
}
{title}
{auto_path}
{low_search_excerpt}
Effective date: {effective_date} - {exp:ce_str:ing php}{php}echo date("F d, Y",{effective_date});{/php}{/exp:ce_str:ing}
Expire date: {expiration_date} - {exp:ce_str:ing php}{php}echo date("F d, Y",{expiration_date});{/php}{/exp:ce_str:ing}
{/exp:low_search:results}
I'm definitely missing something. Any help would be greatly appreciated.
Thanks Low!!!
Replies
Low 8 Apr 2019 06:18
The 'expiration_date' field, is that custom or native? Because it's already a native field, so if you were able to create a custom field with the same name, that might cause some confusion here.
Tyson 8 Apr 2019 20:17
Sorry for the confusion Low. That field is actually named longer than that. "{solution_moa_expiration_date}". The effective date also has a longer name, "{solution_moa_effective_date}". Thanks for the help.
Low 9 Apr 2019 06:13
Can you enable the template debugger and look up all lines and queries that mention Low Search, and share those?
Tyson 9 Apr 2019 20:09
Can I send you the template results through email? There's some URL's I'd rather not show publicly. Where can I send it to? Thanks Low!
Edit: I'll send you the debugging output to your gotolow.com email. Thanks!
Low 10 Apr 2019 06:39
Here's the bit in the debugger output that's relevant (and safe to share here):
Normally, if there's a Ranges parameter, you would see 'Applying Low_search_filter_ranges' before 'Applying Low_search_filter_keywords', which is not the case. However, there is a range:-parameter present in the query.
So it looks like the Ranges filter is not enabled in Low Search's settings in the CP. Can you verify that it is?
Tyson 11 Apr 2019 20:36
Thanks Low! I totally missed the filter checkboxes in the LS settings. Thanks for your help.