From 594a9d362286f9db275aab8d86b56aeee51b8b37 Mon Sep 17 00:00:00 2001 From: dblock Date: Thu, 11 Jul 2024 15:47:37 -0400 Subject: [PATCH] Clear file cache was added in OpenSearch 2.8.0. Signed-off-by: dblock --- spec/namespaces/indices.yaml | 1 + tests/indices/cache.yaml | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/spec/namespaces/indices.yaml b/spec/namespaces/indices.yaml index da6edf888..7cbf8c999 100644 --- a/spec/namespaces/indices.yaml +++ b/spec/namespaces/indices.yaml @@ -2766,6 +2766,7 @@ components: $ref: '../schemas/_common.yaml#/components/schemas/Fields' style: form indices.clear_cache::query.file: + x-version-added: '2.8' in: query name: file description: If true, clears the unused entries from the file cache on nodes with the Search role. diff --git a/tests/indices/cache.yaml b/tests/indices/cache.yaml index ee57d1df5..b44b03a56 100644 --- a/tests/indices/cache.yaml +++ b/tests/indices/cache.yaml @@ -22,7 +22,6 @@ chapters: expand_wildcards: none fielddata: true fields: '*' - file: false index: - movies ignore_unavailable: true @@ -32,6 +31,16 @@ chapters: status: 200 payload: _shards: {} + - synopsis: Clear all cache, file=true (POST). + version: '>= 2.8.0' + path: /_cache/clear + method: POST + parameters: + file: true + response: + status: 200 + payload: + _shards: {} - synopsis: Clear index cache (POST). path: /{index}/_cache/clear method: POST