Spec-Zone.ru › Elasticsearch 8
›Elasticsearch Guide [8.17] ›REST APIs ›Searchable snapshots APIs

Clear cache API

New API reference

For the most up-to-date API details, refer to Searchable snapshots APIs.

This functionality is in technical preview and may be changed or removed in a future release. Elastic will work to fix any issues, but features in technical preview are not subject to the support SLA of official GA features.

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

Request

POST /_searchable_snapshots/cache/clear

POST /<target>/_searchable_snapshots/cache/clear

Prerequisites

If the Elasticsearch security features are enabled, you must have the manage cluster privilege to use this API. You must also have the manage index privileges for the target data stream, index, or alias.

Path parameters

<target>
(Optional, string) Comma-separated list of data streams, indices, and aliases to clear from the cache. Supports wildcards (*). To clear the entire cache, omit this parameter.

Examples

Clears the cache of the index my-index:

resp = client.searchable_snapshots.clear_cache(
    index="my-index",
)
print(resp)
response = client.searchable_snapshots.clear_cache(
  index: 'my-index'
)
puts response
const response = await client.searchableSnapshots.clearCache({
  index: "my-index",
});
console.log(response);
POST /my-index/_searchable_snapshots/cache/clear

© 2023-2025 Elasticsearch
As of September 2024, Elasticsearch is available under a choice of three licenses: the Server Side Public License (SSPL), the Elastic License, or the AGPLv3 (OSI approved).
Elasticsearch and the Elasticsearch logo are trademarks of Elasticsearch B.V., registered in the U.S. and in other countries.
https://www.elastic.co/guide/en/elasticsearch/reference/8.17/searchable-snapshots-api-clear-cache.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API