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

Support archive

In Range i need and as well or condition for min and max rent

Jatin Patel 3 Mar 2016 18:04 question, complete

Currently i am using

range-from:min_rent:max_rent and range-to:min_rent:max_rent which are working cool.

i need ((min_rent >20 && max_rent <100) OR (min_rent ==0 && max_rent ==0))

Please let me know how i can implement this in low search

Replies

  1. Low 3 Mar 2016 22:24

    The short answer is: you can't.

    The long answer is: you would need a custom filter for that.

    Combining two different (sets of) parameters with OR is something that currently doesn't fit in EE's paradigm of handling tags and parameters. Look at the native channel:entries tag -- the only way to use OR, is in param="1|2", where the param should equal 1 OR 2. Combining different params with OR is not possible. The same is true for Low Search, unless if you create a custom filter to specifically handle that.

    Jatin Patel 4 Mar 2016 04:45

    Thanks for your quick replay,

    I would like to know weather i can implement this by using third_party_search_index($data) or by low search hook if yes please let me know hook also if possible give me idea to implement this

    Thanks

    Low 4 Mar 2016 08:01

    The third_party_search_index is only meant for field types that need to index their data in a non-standard way, so that's of no use for you here.

    You could perhaps use either the low_search_pre_search or low_search_post_search hooks, but the would practically be no different from creating your own filter.