In running the following range aggregation [choosing not to specify a 'key'
for each range]
{
"query": {
"match_all": {}
},
"aggs": {
"duration": {
"range": {
"field": "duration",
"ranges": [
{ "to": 60 },
{ "from": 60, "to": 300},
{ "from": 300, "to": 900},
{ "from": 900, "to": 3600},
{ "from": 3600 }
]
}
}
}
}
I seem to be alternating between two result sets, the first request will
return:
"aggregations": {
"duration": {
"buckets": [
{
"to": 60,
"doc_count": 157680
},
{
"from": 60,
"to": 300,
"doc_count": 181398
},
{
"from": 300,
"to": 900,
"doc_count": 39937
},
{
"from": 900,
"to": 3600,
"doc_count": 8809
},
{
"from": 3600,
"doc_count": 298
}
]
}
}
And the subsequent request will return:
"aggregations": {
"duration": {
"buckets": [
{
"key": "-60.0",
"to": 60,
"doc_count": 157680
},
{
"key": "60.0-300.0",
"from": 60,
"to": 300,
"doc_count": 181398
},
{
"key": "300.0-900.0",
"from": 300,
"to": 900,
"doc_count": 39937
},
{
"key": "900.0-3600.0",
"from": 900,
"to": 3600,
"doc_count": 8809
},
{
"key": "3600.0-",
"from": 3600,
"doc_count": 298
}
]
}
}
Each request afterwards alternates between "key" being absent from each
bucket in the list and then being present. Was hoping someone might have
some insight as to what is going on just to satisfy my own curiosity.
--
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/840a3619-2736-49e9-97b3-06a5b2fea9d7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.