Skip to content

Commit

Permalink
Adding yml test for keyword fields with doc_values enabled
Browse files Browse the repository at this point in the history
Signed-off-by: Harsha Vamsi Kalluri <[email protected]>
  • Loading branch information
harshavamsi committed Oct 16, 2023
1 parent 29f79fe commit 29062ab
Showing 1 changed file with 64 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -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}

0 comments on commit 29062ab

Please sign in to comment.