Bounds on Ranged Aggs don't seem to be working

Hi there,

I'm running into something a bit funny with ranged aggs. I am getting records that are double bucketed when they are at the range endpoint. I am doing it like this:

"range": {
"field": def.key,
"keyed": true,
"ranges" : [
{ "key" : "Less than 3 Feet", "to" : 3 },
{ "key" : "3 - 6 Feet", "from" : 3, "to" : 6 },
{ "key" : "6 - 8 Feet", "from" : 6, "to": 8 }
]
}

... so I'm getting records that have a value of '6' and are falling into both the '3 - 6 feet' and the '6 - 8 feet' buckets.

The docs say:
"Note that this aggregation includes the from value and excludes the to value for each range."

https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-bucket-range-aggregation.html

Any idea what might be going on?

Thanks so much!

kind regards,

Todd

Sounds like a bug to me. Could you open an issue with a reproduction script?

Hi dadoonet,

Thanks so much for the reply! I'd be happy to open an issue. Sorry if the answer to this should be obvious, but what do you mean by a "reproduction script" ?

thanks,
Todd

Something like this:

DELETE index
PUT index/type/1
{
  "foo": "bar"
}
GET index/type/_search
{
  "query": {
    "match": {
      "foo": "bar"
    }
  }
}