My data changes all the time, but I'd like to keep some of my query results
cached for a while - say 1 minute.
My refresh interval (5 sec) cannot be changed because I need near-realtime
searches for other query types.
I can read that there is a "indices.cache.query.expire" config setting
where the general TTL of all Shard Query Caches can be set, but the docs
specify that this shouldn't really be used because all cached results are
invalidated anyway upon refresh.
Two questions:
Is my understanding of the Shard Query Cache invalidation mechanism
correct?
Is there a way to specify a TTL on the query-level, that makes the
cached result survive the refresh interval?
My data changes all the time, but I'd like to keep some of my query
results cached for a while - say 1 minute.
My refresh interval (5 sec) cannot be changed because I need near-realtime
searches for other query types.
I can read that there is a "indices.cache.query.expire" config setting
where the general TTL of all Shard Query Caches can be set, but the docs
specify that this shouldn't really be used because all cached results are
invalidated anyway upon refresh.
The thing is that we wanted this cache to give accurate results: no matter
if it is enabled or not you are going to get the same results. (just like
the filter caches and fielddata caches).
In your case, I think the best option would be to put a cache in front of
elasticsearch?
My data changes all the time, but I'd like to keep some of my query
results cached for a while - say 1 minute.
My refresh interval (5 sec) cannot be changed because I need
near-realtime searches for other query types.
I can read that there is a "indices.cache.query.expire" config setting
where the general TTL of all Shard Query Caches can be set, but the docs
specify that this shouldn't really be used because all cached results are
invalidated anyway upon refresh.
The thing is that we wanted this cache to give accurate results: no matter
if it is enabled or not you are going to get the same results. (just like
the filter caches and fielddata caches).
In your case, I think the best option would be to put a cache in front of
elasticsearch?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.