We have a service which is using ES sporadically, (once every few hours). We noted that the first couple of times we query ES takes a lot longer than subsequent calls. For example if we perform the following query:
{
"query": {
"bool": {
"must": [
{"term": {
"organization.id": 1234
}},
{"match": {
"name": "BEST HITS"
}}
]
}
}
}
the first call can take up to 5 seconds. Subsequently calls decrease rapidly (2 seconds, 1100 ms, 100 ms). We have done some experimenting with the property index.search.idle.after and are now testing changing index.refresh_interval but I'm wondering whether we are on the right track. All help will be appreciated.