Searchable Snapshots

class elasticsearch.client.SearchableSnapshotsClient(client)
Parameters:

client (BaseClient)

cache_stats(*, node_id=None, error_trace=None, filter_path=None, human=None, master_timeout=None, pretty=None)

Retrieve node-level cache statistics about searchable snapshots.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/searchable-snapshots-apis.html

Parameters:
  • node_id (str | Sequence[str] | None) – A comma-separated list of node IDs or names to limit the returned information; use _local to return information from the node you’re connecting to, leave empty to get information from all nodes

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None)

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

clear_cache(*, index=None, allow_no_indices=None, error_trace=None, expand_wildcards=None, filter_path=None, human=None, ignore_unavailable=None, pretty=None)

Clear the cache of searchable snapshots.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/searchable-snapshots-apis.html

Parameters:
  • index (str | Sequence[str] | None) – A comma-separated list of index names

  • allow_no_indices (bool | None) – Whether to ignore if a wildcard indices expression resolves into no concrete indices. (This includes _all string or when no indices have been specified)

  • expand_wildcards (Sequence[Literal['all', 'closed', 'hidden', 'none', 'open'] | str] | ~typing.Literal['all', 'closed', 'hidden', 'none', 'open'] | str | None) – Whether to expand wildcard expression to concrete indices that are open, closed or both.

  • ignore_unavailable (bool | None) – Whether specified concrete indices should be ignored when unavailable (missing or closed)

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]

mount(*, repository, snapshot, index=None, error_trace=None, filter_path=None, human=None, ignore_index_settings=None, index_settings=None, master_timeout=None, pretty=None, renamed_index=None, storage=None, wait_for_completion=None, body=None)

Mount a snapshot as a searchable index.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/searchable-snapshots-api-mount-snapshot.html

Parameters:
  • repository (str) – The name of the repository containing the snapshot of the index to mount

  • snapshot (str) – The name of the snapshot of the index to mount

  • index (str | None)

  • ignore_index_settings (Sequence[str] | None)

  • index_settings (Mapping[str, Any] | None)

  • master_timeout (Literal[-1] | ~typing.Literal[0] | str | None) – Explicit operation timeout for connection to master node

  • renamed_index (str | None)

  • storage (str | None) – Selects the kind of local storage used to accelerate searches. Experimental, and defaults to full_copy

  • wait_for_completion (bool | None) – Should this request wait until the operation has completed before returning

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

  • body (Dict[str, Any] | None)

Return type:

ObjectApiResponse[Any]

stats(*, index=None, error_trace=None, filter_path=None, human=None, level=None, pretty=None)

Retrieve shard-level statistics about searchable snapshots.

https://www.elastic.co/guide/en/elasticsearch/reference/8.14/searchable-snapshots-apis.html

Parameters:
  • index (str | Sequence[str] | None) – A comma-separated list of index names

  • level (Literal['cluster', 'indices', 'shards'] | str | None) – Return stats aggregated at cluster, index or shard level

  • error_trace (bool | None)

  • filter_path (str | Sequence[str] | None)

  • human (bool | None)

  • pretty (bool | None)

Return type:

ObjectApiResponse[Any]