forked from opensearch-project/OpenSearch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding yml test for keyword fields with doc_values enabled
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
- Loading branch information
1 parent
4e0d25e
commit c819524
Showing
2 changed files
with
54 additions
and
1 deletion.
There are no files selected for viewing
46 changes: 46 additions & 0 deletions
46
rest-api-spec/src/main/resources/rest-api-spec/test/search/340_keyword_doc_values.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
"search on keyword fields with doc_values enabled": | ||
- do: | ||
indices.create: | ||
index: test | ||
body: | ||
mappings: | ||
properties: | ||
"some_keyword": | ||
type: "keyword" | ||
index: true | ||
doc_values: true | ||
|
||
- do: | ||
bulk: | ||
index: test | ||
refresh: true | ||
body: | ||
- '{"index": {"_index": "test", "_id": "1" }}' | ||
- '{ "some_keyword": "ingesting some random keyword data" }' | ||
- '{ "index": { "_index": "test", "_id": "2" }}' | ||
- '{ "some_keyword": "400" }' | ||
- '{ "index": { "_index": "test", "_id": "3" } }' | ||
- '{ "some_keyword": "5" }' | ||
|
||
- do: | ||
search: | ||
index: test | ||
body: | ||
query: | ||
prefix: | ||
some_keyword: "ing" | ||
|
||
- match: { hits.hits.0._source.some_keyword: "ingesting some random keyword data" } | ||
|
||
- do: | ||
search: | ||
index: test | ||
body: | ||
query: | ||
range: { | ||
"some_keyword": { | ||
"lt": 500 | ||
} } | ||
|
||
- match: { hits.total.value: 2 } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters