Actually, yes, it should be
Overdue: date <= 2014-02-19
March: 2014-02-20 <= date <= 2014-03-19
April: 2014-03-20 <= date <= 2014-04-16
Yeah, I can add a day to the upper-range to work around this (its what I
have to do now).
However, it also means I have to then subtract a day when taking the
results to create a filter definition - because the expected filter
behaviour is gte/lte.
ie If the user clicks on "March", we have to translate that into a
query/filter to show the list of things that fall within that range.
The user sees the filter details (and can modify them) - and the behaviour
the user expects is gte/lte - ie the user will expect to see the date range
2014-02-20--2014-03-19.
So it means I have to do a bunch of flipping back and forth...
I appreciate the performance implications. Is it practical to have an
optimised/flexible implementations?
-Nick
On Tuesday, 11 March 2014 15:19:24 UTC, Clinton Gormley wrote:
On 7 March 2014 12:46, mooky <nick.mi...@gmail.com <javascript:>> 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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/c6813f07-9c56-4e29-822c-5e0f7b164f32%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.