On 7 March 2014 12:46, mooky <nick.minute...@gmail.com> wrote:

> So the previous, current and next period-end dates are:
> 2014-02-19, 2014-03-19 & 2014-04-16.
> I define the ranges therefore as:
> Overdue: date < *2014-02-19*
> March: 2014-02-20 < date < *2014-03-19*
> April: 2014-03-20 < date < *2014-04-16*
>

Actually, it should be:

Overdue: date <= *2014-02-19*
March: 2014-02-20 < date <= *2014-03-19*
April: 2014-03-20 < date <= *2014-04-16*

which would be represented as:

{ to: "2014-02-20"}
{ from: "2014-02-20", to: "2014-03-20" }
{ from: "2014-03-20", to: "2014-04-17" }

I realise that this requires a little work on your side (ie adding a day),
but I'm not pushing back on this just because "it can already be done".  I
asked for the same thing a while back.  Turns out that the problem is that
the implementation with to/from is very optimized. If we were to support
to/from/incl/excl/gt/gte/lt/lte etc, then the implementation would need to
pass that information around while building the aggs, impacting performance.

clint

-- 
You received this message because you are subscribed to the Google Groups 
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elasticsearch+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/CAPt3XKQMcOzH%2By-eDKdP-794u-gbDE_HhpZg6O_T%3DmoYpCg01g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to