Bust the request cache when the mapping changes (#66295)

This makes sure that we only serve a hit from the request cache if it
was build using the same mapping and that the same mapping is used for
the entire "query phase" of the search.

Closes #62033
This commit is contained in:
Nik Everett 2020-12-23 13:19:02 -05:00 committed by GitHub
parent 11153fcb33
commit 3e3152406a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 1142 additions and 543 deletions

View file

@ -32,14 +32,14 @@ Scripted queries that use the API calls which are non-deterministic, such as
The cache is smart -- it keeps the same _near real-time_ promise as uncached
search.
Cached results are invalidated automatically whenever the shard refreshes, but
only if the data in the shard has actually changed. In other words, you will
always get the same results from the cache as you would for an uncached search
request.
Cached results are invalidated automatically whenever the shard refreshes to
pick up changes to the documents or when you update the mapping. In other
words you will always get the same results from the cache as you would for an
uncached search request.
The longer the refresh interval, the longer that cached entries will remain
valid. If the cache is full, the least recently used cache keys will be
evicted.
valid even if there are changes to the documents. If the cache is full, the
least recently used cache keys will be evicted.
The cache can be expired manually with the <<indices-clearcache,`clear-cache` API>>: