I'd like to disable query caching to compare performance of different
mapping configurations. The trouble is that ES seems to be always caching
the results, despite that I've attempted many different ways to disable the
cache. For example, the first time I try the following query:
curl -XPOST "http://localhost:9200/users/_search?search_type=count" -d'
"query": ""corn chowder" OR "air conditioner""
It takes about about 8 seconds and returns roughly 117,000 hits. But if I
attempt the same query a minute later, it takes only 90ms and returns the
same number of hits. But if I change the query, it takes about 8 seconds
again. So clearly there's some kind of caching going on.
I've tried many different ways to disable caching. I tried doing so at the
cluster level (index.cache.field.max_size = 0 and index.cache.field.expire
= 0), at the index level (index.cache.filter.max_size = 0 and index.cache.filter.expire
= 0), at the query level (_cache = false), and even explicitly clearing the
cache between requests:
curl -XPOST 'http://localhost:9200/users_20120819/_cache/clear'
...but same result. Any help would really be appreciated. I thought
caching wasn't even performed for regular queries.