Clear the cache Technical preview; Added in 7.10.0

POST /{index}/_searchable_snapshots/cache/clear

All methods and paths for this operation:

POST /_searchable_snapshots/cache/clear

POST /{index}/_searchable_snapshots/cache/clear

Clear indices and data streams from the shared cache for partially mounted indices.

Required authorization

  • Index privileges: manage
  • Cluster privileges: manage
External documentation

Path parameters

  • index string | array[string] Required

    A comma-separated list of data streams, indices, and aliases to clear from the cache. It supports wildcards (*).

Query parameters

  • expand_wildcards string | array[string]

    Whether to expand wildcard expression to concrete indices that are open, closed or both.

    Supported values include:

    • all: Match any data stream or index, including hidden ones.
    • open: Match open, non-hidden indices. Also matches any non-hidden data stream.
    • closed: Match closed, non-hidden indices. Also matches any non-hidden data stream. Data streams cannot be closed.
    • hidden: Match hidden data streams and hidden indices. Must be combined with open, closed, or both.
    • none: Wildcard expressions are not accepted.

    Values are all, open, closed, hidden, or none.

  • 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)

  • ignore_unavailable boolean

    Whether specified concrete indices should be ignored when unavailable (missing or closed)

Responses

  • 200 application/json
POST /{index}/_searchable_snapshots/cache/clear
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"