I have objects where every object has a nonnegative "weight" field. i want to sort the objects into 10 weight classes of interval 100, i tried putting in the "aggs" field, the following:
"aggs":{
"weights":{
"histogram":{
"interval":100,
"field":"weight"
}
}
}
But this would give me every interval of 100, e.g.(starting interval : doc_count)
(0 : 3) (100 : 5) ... (900 : 3) (1000 : 2) (1100 : 5)
What I would like instead is
(0 : 3) (100 : 5) ... (900 : 10) where 10 comes from the bucket itself and all buckets after it
I tried using the range feature: "range":{"weight":{"to":"1000"}} but that ignores all the buckets that come after the 10th one. Is this possible with the histogram feature on elastic? Or would this require something else?