Same Elasticsearch Query takes different time to give the response back

Hi
I am using Elasticsearch for my project, where in it searches for result on the given indices.
For the same query I can see that the time in which response is being returned to my service varies, minimal variation can be understood but the variation is in levels of seconds. Example being same query may respond in 200-300 ms at the same time I can see the response being received in 10-15 second. When using the same query to for performance testing with Jmeter it is showing min as 225 ms and max as 10sec. Not sure why the deviation.
I am using ES version 5.4, query is complex as I am using function score to provide custom scoring. I am searching over multiple indices to get the result, document stored in each indices count will be around 200-500 document in each index therefore no. of shards is 1 and replica is 2.
Any idea or suggestion on how to bring down the query time will be great, even if I am able to achieve an average of 500 ms I am fine with that.

Thanks
Ashit

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.