There is my comment with the result.
The problem is that I can't make histogram start from the value I want.
For instance, I've got a set of values 1..11, I want to start the
histogram from *extended_bounds.min=*7 and group by interval=3. I expect
to get results 7 (3 docs), 10 (2 docs), but actually I get this: 6 (2
docs), 9 (3 docs).
As you see the histogram goes only by divisible by interval values (it's
the same if the set is 2..11). There is no related information about this
behaviour in the ES docs.
Is this a bug? How can I solve that problem and accomplish that what I need?
This feature is not supported by the histogram aggregation. Maybe one way
you could achieve the same thing would be by using a script that subtracts
1 from your field values?
On Sun, Dec 21, 2014 at 8:49 PM, Demetrioca 2e3s19@gmail.com wrote:
Here is my code to reproduce this problem: Elasticsearch histogram can start only from divisible by interval value · GitHub
There is my comment with the result.
The problem is that I can't make histogram start from the value I want.
For instance, I've got a set of values 1..11, I want to start the
histogram from *extended_bounds.min=*7 and group by interval=3. I
expect to get results 7 (3 docs), 10 (2 docs), but actually I get this: 6
(2 docs), 9 (3 docs).
As you see the histogram goes only by divisible by interval values (it's
the same if the set is 2..11). There is no related information about this
behaviour in the ES docs.
Is this a bug? How can I solve that problem and accomplish that what I
need?
The result appears to be expected, I need only add +1 (remainder from the
start value divided by interval) to the aggregated keys in my code.
If histogram aggregation would support value transformation for histogram
aggregation it would even look like the aggregation supports what I need.
On Monday, December 22, 2014 3:29:00 AM UTC+6, Adrien Grand wrote:
Hi,
This feature is not supported by the histogram aggregation. Maybe one way
you could achieve the same thing would be by using a script that subtracts
1 from your field values?
On Sun, Dec 21, 2014 at 8:49 PM, Demetrioca <2e3...@gmail.com
<javascript:>> wrote:
Here is my code to reproduce this problem: Elasticsearch histogram can start only from divisible by interval value · GitHub
There is my comment with the result.
The problem is that I can't make histogram start from the value I want.
For instance, I've got a set of values 1..11, I want to start the
histogram from *extended_bounds.min=*7 and group by interval=3. I
expect to get results 7 (3 docs), 10 (2 docs), but actually I get
this: 6 (2 docs), 9 (3 docs).
As you see the histogram goes only by divisible by interval values (it's
the same if the set is 2..11). There is no related information about this
behaviour in the ES docs.
Is this a bug? How can I solve that problem and accomplish that what I
need?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.