Skip to content

Commit

Permalink
add changelog and api test
Browse files Browse the repository at this point in the history
  • Loading branch information
Dharin-shah committed Dec 17, 2023
1 parent 8242e15 commit 53433f9
Showing 1 changed file with 53 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
"matched queries":
- skip:
version: " - 2.12.0"
reason: "implemented for versions post 2.12.0"

- do:
indices.create:
index: test

- do:
bulk:
refresh: true
body:
- '{ "index" : { "_index" : "test_1", "_id" : "1" } }'
- '{"field" : 1 }'
- '{ "index" : { "_index" : "test_1", "_id" : "2" } }'
- '{"field" : [1, 2] }'

- do:
search:
index: test_1
body:
query:
bool: {
should: [
{
match: {
field: {
query: 1,
_name: match_field_1
}
}
},
{
match: {
field: {
query: 2,
_name: match_field_2,
boost: 10
}
}
}
]
}

- match: { hits.total.value: 2 }
- length: { hits.hits.0.matched_queries: 2 }
- match: { hits.hits.0.matched_queries: [ "match_field_1", "match_field_2" ] }
- length: { hits.hits.1.matched_queries: 1 }
- match: { hits.hits.1.matched_queries: [ "match_field_1" ] }


0 comments on commit 53433f9

Please sign in to comment.