"not opting out of query cache; authorization is not alowed"

Hello people.

I'm getting a lot of the following in my Elasticsearch 7.3.2 logs:
[index_name] not opting out of the query cache; authorization is not allowed
...for several indexes, and the messages repeat.

I googled about it and found remarkably little.

What does this message mean? I found it in OptOutQueryCache.java, and it seems to have something to do with licensing?

I don't think I want elasticsearch caching, especially if it caches negative results. We have a lot of code that'll issue an elasticsearch request, and then retry with exponential backoff upon not receiving any useful result - it's really slowing down our test suite.

How can I disable elasticsearch caching? I'm interested in:

  1. ...how to disable caching for all of elasticsearch
  2. ...how to disable caching for just one index
  3. ...how to disable caching for just one query - is it like res = s.execute(ignore_cache=True) with the DSL?

...so we can compare which works best for us.

Filesystem caching is not a problem for us, and in fact is a good thing as a performance optimization that doesn't change results.

We're working mostly in Python. We're mostly using elasticsearch_dsl, but we also use some of elasticsearch-py.

Thanks!

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