I'm using the range filter like this for my application (Ignore the syntax)-
{:range {:created_at {:gte "from_date"
:lte "to_date"}}}
In some cases one of the dates can be "nil". I'm getting the correct results with the above query, but was wondering if the performance would be better if I split this to be something like-
{:range {:created_at
(if (nil? "from_date") {:lte "to_date"})
(if (nil? "to_date") {:gte "from_date"}
(else {:gte "from_date"
:lte "to_date"})}}