How does request cache work when there are multiple indices involved?

I understand that as long as the request JSON doesn't change and the shards don't get refreshed, request cache can be utilized.

Let's consider this scenario where I have daily indices and I do a wildcard search on these indices to do some aggregations.

If I am applying rounded datetime filters to query last 1 month results, JSON request would be changing. Does this mean that request cache is not going to work?

I remember reading something about ES rewriting range, numeric filters internally to optimize in 2.x/5.x release notes. i.e if an index min,max limits fall in between the limits of main range filters that user is using, it will get rewritten to use those min,max limits before running the query on that index. In which case reqeust cache would work on those indices?

I can't find that link now, any clarification in this regard is appreciated.

Thanks in advance.

I think you might be looking for this blog post.

Thanks a lot, that's the blog post I was looking for. That clarifies my doubt that the request cache will work on those intermediate indices.

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