Hi,
I'm trying to understand why queries some time respond instantly and
some time take a very long time to complete.
No major load on elasticsearch, using 6 servers, 3 shards.
We run the same exact query in a loop and while it's usually very
fast, every minute or so, the query time jumps to above 5 seconds.
Any ideas what could possibly be causing this?
See below example of running the same query twice, 1 second apart.
First time it's fast, then it gets slow, then fast again.
curl -XGET "http://localhost:5004/spi/storeproducts/_search?
pretty=true" -d '{"from":"0","size":"20","sort":{"_score":""},"query":
{"filtered":{"query":{"query_string":
{"query":"ppc*","phraseSlop":"0","useDisMax":"false","fields":
["name.s^20","emailaddress.s^15","emailaddress_aliases.s^10","_all"]}},"filter":
{"and":[{"term":{"_account_id":"1429"}}]}}}}'
{
"took" : 45,
"timed_out" : false,
"_shards" : {
"total" : 3,
"successful" : 3,
"failed" : 0
},
"hits" : {
"total" : 6,
"max_score" : 0.03996804,
--
curl -XGET "http://localhost:5004/spi/storeproducts/_search?
pretty=true" -d '{"from":"0","size":"20","sort":{"_score":""},"query":
{"filtered":{"query":{"query_string":
{"query":"ppc*","phraseSlop":"0","useDisMax":"fase","fields":
["name.s^20","emailaddress.s^15","emailaddress_aliases.s^10","_all"]}},"filter":
{"and":[{"term":{"_account_id":"1429"}}]}}}}'
{
"took" : 5845,
"timed_out" : false,
"_shards" : {
"total" : 3,
"successful" : 3,
"failed" : 0
},
"hits" : {
"total" : 6,
"max_score" : 0.03996804,