Closed
Description
to reproduce the issue:
create two indexes:
PUT /test1
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
},
"date": {
"type": "date"
},
"entity": {
"type": "keyword"
}
}
}
}
PUT /test2
{
"mappings": {
"properties": {
"location": {
"type": "geo_point"
},
"date": {
"type": "date"
},
"entity": {
"type": "keyword"
}
}
}
}
Insert some data:
POST /_bulk
{ "index" : { "_id" : "1", "_index" : "test2" } }
{ "date" : "2020-01-01T01:00:00.0Z", "entity" : "e1", "location" : { "lat" : 50.3, "lon" : 0.13 } }
{ "index" : { "_id" : "1", "_index" : "test2" } }
{ "date" : "2020-01-01T01:00:00.0Z", "entity" : "e2", "location" : { "lat" : 50.3, "lon" : 0.13 } }
execute the following query:
GET test1,test2/_search
{
"size": 0,
"aggs": {
"tracks": {
"filters": {
"filters": {
"1": {
"term": {
"entity": "e1"
}
},
"2": {
"term": {
"entity": "e2"
}
}
}
},
"aggs": {
"path": {
"geo_line": {
"point": {
"field": "location"
},
"sort": {
"field": "date"
}
}
}
}
}
}
}
you would see something like:
{
"shard" : 0,
"index" : "test1",
"node" : "oOjCv2xpQmm-rWmAo0mcZg",
"reason" : {
"type" : "array_index_out_of_bounds_exception",
"reason" : "Index 1 out of bounds for length 1"
}
}