Hi,
We have the following query. It doesn't seem to scale for us. Using the REST API, we're only able to perform to about 400 requests/second. It's a 3 node cluster, about 200k documents, 5 shards and 5gb of memory per node on ES 1.5.2. The query matches 45 of those documents. Neither CPU nor memory show any taxing, and we're currently using cached threadpool mode (though similar results come back with fixed sizing). We are seeing linear growth in the response times, starting from single digit milliseconds to 10ths of seconds.
Now I can see some explicit bad moves in the query, especially what seems like a duplicate term filter. I would image ES optimizes that but can't be sure.
POST myindex/_search
{
"aggregations" : {
"filter1" : {
"filter" : {
"and" : {
"filters" : [ {
"terms" : {
"fromId" : [ 2,31 ]
}
}, {
"term" : {
"closed" : false
}
}, {
"and" : {
"filters" : [ {
"terms" : {
"toId" : [ 2,31 ]
}
}, {
"terms" : {
"fromId" : [ 2,31 ]
}
} ]
}
} ]
}
},
"aggregations" : {
"range" : {
"range" : {
"field" : "dueDateNumber",
"ranges" : [ {
"key" : "overdue",
"to" : 201510260000
}, {
"key" : "comingsoon",
"from" : 201510260000,
"to" : 201511240000
}, {
"key" : "thefuture",
"from" : 201511240000
} ]
}
}
}
}
}
}