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

Support archive

The Low Search reverse range filter doesn't seem to produce the correct results.

Tyson 5 Apr 2019 21:45 question, complete

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

  1. 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.

  2. 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.

  3. 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?

  4. 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!

  5. Low 10 Apr 2019 06:39

    Here's the bit in the debugger output that's relevant (and safe to share here):

    (0.070312 / 2.60MB) Calling Class/Method: Low_search/results 
    (0.074219 / 2.61MB) -> Class Called: Low_search
    (0.074219 / 2.61MB) -> Method Called: results
    (0.082031 / 2.76MB) Low Search: Applying Low_search_filter_keywords
    (0.082031 / 2.76MB) Low Search: No keyword search
    (0.082031 / 2.76MB) Low Search: Parameters set: query="eyJyZXN1bHRfcGFnZSI6ImVpcFwvdGVzdDIiLCJyYW5nZTpyYW5nZV90ZXN0XzE6cmFuZ2VfdGVzdF8yIjoiMzAwIn0" require_query="yes" channel="exec_info_portal_content" limit="10" result_page="eip/test2" range:range_test_1:range_test_2="300"
    (0.082031 / 2.76MB) Low Search: Pre-applying search vars to tagdata
    (0.085937 / 2.76MB) Low Search: Calling the channel module


    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?

  6. Tyson 11 Apr 2019 20:36

    Thanks Low! I totally missed the filter checkboxes in the LS settings. Thanks for your help.