OpenSearch/docs/reference/indices/clearcache.asciidoc
Nik Everett 4b219d15d2 Add CONSOLE to a few snippets in reference docs
This allows them to be run in Console and adds them to the list of
docs that are automatically tested as part of the build.

Relates to #18160
2016-09-01 13:08:36 -04:00

35 lines
974 B
Plaintext

[[indices-clearcache]]
== Clear Cache
The clear cache API allows to clear either all caches or specific cached
associated with one or more indices.
[source,js]
--------------------------------------------------
POST /twitter/_cache/clear
--------------------------------------------------
// CONSOLE
// TEST[setup:twitter]
The API, by default, will clear all caches. Specific caches can be cleaned
explicitly by setting `query`, `fielddata` or `request`.
All caches relating to a specific field(s) can also be cleared by
specifying `fields` parameter with a comma delimited list of the
relevant fields.
[float]
=== Multi Index
The clear cache API can be applied to more than one index with a single
call, or even on `_all` the indices.
[source,js]
--------------------------------------------------
POST /kimchy,elasticsearch/_cache/clear
POST /_cache/clear
--------------------------------------------------
// CONSOLE
// TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]