2013-08-28 19:24:34 -04:00
|
|
|
[[indices-clearcache]]
|
|
|
|
== Clear Cache
|
|
|
|
|
|
|
|
The clear cache API allows to clear either all caches or specific cached
|
2016-03-09 09:32:54 -05:00
|
|
|
associated with one or more indices.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
[source,js]
|
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
POST /twitter/_cache/clear
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[setup:twitter]
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2014-08-06 05:54:51 -04:00
|
|
|
The API, by default, will clear all caches. Specific caches can be cleaned
|
2015-06-26 10:31:38 -04:00
|
|
|
explicitly by setting `query`, `fielddata` or `request`.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
All caches relating to a specific field(s) can also be cleared by
|
|
|
|
specifying `fields` parameter with a comma delimited list of the
|
2018-07-18 12:33:09 -04:00
|
|
|
relevant fields. Note that the provided names must refer to concrete
|
|
|
|
fields -- objects and field aliases are not supported.
|
2013-08-28 19:24:34 -04:00
|
|
|
|
|
|
|
[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]
|
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
POST /kimchy,elasticsearch/_cache/clear
|
2013-08-28 19:24:34 -04:00
|
|
|
|
2016-09-01 13:05:22 -04:00
|
|
|
POST /_cache/clear
|
2013-08-28 19:24:34 -04:00
|
|
|
--------------------------------------------------
|
2016-09-01 13:05:22 -04:00
|
|
|
// CONSOLE
|
|
|
|
// TEST[s/^/PUT kimchy\nPUT elasticsearch\n/]
|