From 29062abf36d1468fd2c4ddfc95ffa7c5233609da Mon Sep 17 00:00:00 2001 From: Harsha Vamsi Kalluri Date: Mon, 16 Oct 2023 09:52:09 -0700 Subject: [PATCH] Adding yml test for keyword fields with doc_values enabled Signed-off-by: Harsha Vamsi Kalluri --- .../test/search/340_keyword_doc_values.yml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 rest-api-spec/src/main/resources/rest-api-spec/test/search/340_keyword_doc_values.yml diff --git a/rest-api-spec/src/main/resources/rest-api-spec/test/search/340_keyword_doc_values.yml b/rest-api-spec/src/main/resources/rest-api-spec/test/search/340_keyword_doc_values.yml new file mode 100644 index 0000000000000..cc96c892eeabd --- /dev/null +++ b/rest-api-spec/src/main/resources/rest-api-spec/test/search/340_keyword_doc_values.yml @@ -0,0 +1,64 @@ +--- +"search on keyword fields with doc_values enabled": + - do: + indices.create: + index: test + body: + mappings: + properties: + some_keyword: + type: "keyword" + index: false + doc_values: true + + - do: + index: + index: test + id: 1 + body: { some_keyword: "ingesting some random keyword data" } + + - do: + index: + index: test + id: 2 + body: { some_keyword: "400" } + + + - do: + index: + index: test + id: 3 + body: { some_keyword: "5" } + + - do: + search: + index: test + body: + query: + term: + text: + query: "ingesting" + + - match: {hits.total: 1} + + - do: + search: + index: test + body: + query: + prefix: + some_keyword: "ing" + + - match: {hits.total: 1} + + - do: + search: + index: test + body: + query: + range: { + "k1": { + "gte": 10 + }} + + - match: {hits.total: 1}