Clear the cache
Technical preview; Added in 7.10.0
Clear indices and data streams from the shared cache for partially mounted indices.
Required authorization
- Index privileges:
manage
- Cluster privileges:
manage
Query parameters
-
expand_wildcards
string | array[string] Whether to expand wildcard expression to concrete indices that are open, closed or both.
Values are
all
,open
,closed
,hidden
, ornone
. -
allow_no_indices
boolean Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes
_all
string or when no indices have been specified)
POST
/_searchable_snapshots/cache/clear
Console
POST /my-index/_searchable_snapshots/cache/clear
resp = client.searchable_snapshots.clear_cache(
index="my-index",
)
const response = await client.searchableSnapshots.clearCache({
index: "my-index",
});
response = client.searchable_snapshots.clear_cache(
index: "my-index"
)
$resp = $client->searchableSnapshots()->clearCache([
"index" => "my-index",
]);
curl -X POST -H "Authorization: ApiKey $ELASTIC_API_KEY" "$ELASTICSEARCH_URL/my-index/_searchable_snapshots/cache/clear"