Skip to content

Commit

Permalink
Add test cases to verify returning 400 responses if unmapped fields a…
Browse files Browse the repository at this point in the history
…re included for some types of query

Signed-off-by: imyp92 <[email protected]>
  • Loading branch information
imyp92 committed Jun 11, 2024
1 parent 18d66b0 commit 25714ce
Showing 1 changed file with 45 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,3 +83,48 @@
index: documents_index
id: some_id
- match: { responses.0.hits.total: 1 }

- do:
catch: bad_request
index:
index: queries_index
body:
query:
query_string:
query: "unmapped: *"

- do:
catch: bad_request
index:
index: queries_index
body:
query:
query_string:
query: "_exists_: unmappedField"

- do:
catch: bad_request
index:
index: queries_index
body:
query:
query_string:
query: "unmappedField: <100"

- do:
catch: bad_request
index:
index: queries_index
body:
query:
query_string:
query: "unmappedField: test~"

- do:
catch: bad_request
index:
index: queries_index
body:
query:
query_string:
query: "unmappedField: test*"

0 comments on commit 25714ce

Please sign in to comment.