Clear the cache Technical preview; Added in 7.10.0

POST /_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
More about searchable snapshots

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, or none.

  • allow_no_indices boolean

    A setting that does two separate checks on the index expression. If false, the request returns an error (1) if any wildcard expression (including _all and *) resolves to zero matching indices or (2) if the complete set of resolved indices, aliases or data streams is empty after all expressions are evaluated. If true, index expressions that resolve to no indices are allowed and the request returns an empty result.

  • ignore_unavailable boolean

    If false, the request returns an error if it targets a concrete (non-wildcarded) index, alias, or data stream that is missing, closed, or otherwise unavailable. If true, unavailable concrete targets are silently ignored.

Responses

  • 200 application/json
POST /_searchable_snapshots/cache/clear
curl \
 --request POST 'http://api.example.com/_searchable_snapshots/cache/clear'