mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-09 22:45:04 +00:00
This is a backport of #54803 for 7.x. This pull request cherry picks the squashed commit from #54803 with the additional commits: 6f50c92 which adjusts master code to 7.x a114549 to mute a failing ILM test (#54818) 48cbca1 and 50186b2 that cleans up and fixes the previous test aae12bb that adds a missing feature flag (#54861) 6f330e3 that adds missing serialization bits (#54864) bf72c02 that adjust the version in YAML tests a51955f that adds some plumbing for the transport client used in integration tests Co-authored-by: David Turner <david.turner@elastic.co> Co-authored-by: Yannick Welsch <yannick@welsch.lu> Co-authored-by: Lee Hinman <dakrone@users.noreply.github.com> Co-authored-by: Andrei Dan <andrei.dan@elastic.co>
77 lines
1.7 KiB
Plaintext
77 lines
1.7 KiB
Plaintext
[role="xpack"]
|
|
[testenv="basic"]
|
|
[[searchable-snapshots-api-clear-cache]]
|
|
=== Clear cache API
|
|
++++
|
|
<titleabbrev>Clear cache</titleabbrev>
|
|
++++
|
|
|
|
experimental[]
|
|
|
|
Clear the cache of searchable snapshots.
|
|
|
|
[[searchable-snapshots-api-clear-cache-request]]
|
|
==== {api-request-title}
|
|
|
|
`POST /_searchable_snapshots/cache/clear`
|
|
|
|
`POST /<index>/_searchable_snapshots/cache/clear`
|
|
|
|
[[searchable-snapshots-api-clear-cache-prereqs]]
|
|
==== {api-prereq-title}
|
|
|
|
If the {es} {security-features} are enabled, you must have the
|
|
`manage` cluster privilege and the `manage` index privilege
|
|
for any included indices to use this API.
|
|
For more information, see <<security-privileges>>.
|
|
|
|
[[searchable-snapshots-api-clear-cache-desc]]
|
|
==== {api-description-title}
|
|
|
|
|
|
[[searchable-snapshots-api-clear-cache-path-params]]
|
|
==== {api-path-parms-title}
|
|
|
|
`<index>`::
|
|
(Optional, string)
|
|
A comma-separated list of index names for which the
|
|
searchable snapshots cache must be cleared.
|
|
|
|
|
|
[[searchable-snapshots-api-clear-cache-example]]
|
|
==== {api-examples-title}
|
|
////
|
|
[source,console]
|
|
-----------------------------------
|
|
PUT /docs
|
|
{
|
|
"settings" : {
|
|
"index.number_of_shards" : 1,
|
|
"index.number_of_replicas" : 0
|
|
}
|
|
}
|
|
|
|
PUT /_snapshot/my_repository/my_snapshot?wait_for_completion=true
|
|
{
|
|
"include_global_state": false,
|
|
"indices": "docs"
|
|
}
|
|
|
|
DELETE /docs
|
|
|
|
POST /_snapshot/my_repository/my_snapshot/_mount?wait_for_completion=true
|
|
{
|
|
"index": "docs"
|
|
}
|
|
-----------------------------------
|
|
// TEST[setup:setup-repository]
|
|
////
|
|
|
|
Clears the cache of the index `docs`:
|
|
|
|
[source,console]
|
|
--------------------------------------------------
|
|
POST /docs/_searchable_snapshots/cache/clear
|
|
--------------------------------------------------
|
|
// TEST[continued]
|