Skip to content

Commit 64d06f8

Browse files
committed
Add yaml test
1 parent f7052aa commit 64d06f8

File tree

1 file changed

+15
-0
lines changed
  • plugins/examples/rescore/src/yamlRestTest/resources/rest-api-spec/test/example-rescore

1 file changed

+15
-0
lines changed

plugins/examples/rescore/src/yamlRestTest/resources/rest-api-spec/test/example-rescore/30_factor_field.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ setup:
4848
- match: { hits.hits.1._score: 20 }
4949
- match: { hits.hits.2._score: 10 }
5050

51+
---
52+
"referencing a missing field returns bad request":
53+
- do:
54+
catch: bad_request
55+
search:
56+
index: test
57+
body:
58+
rescore:
59+
example:
60+
factor: 1
61+
factor_field: missing
62+
- match: { status: 400 }
63+
- match: { error.root_cause.0.type: "illegal_argument_exception" }
64+
- match: { error.root_cause.0.reason: "Missing value for field [missing]" }
65+
5166
---
5267
"sorted based on a numeric field and rescored based on a factor field using a window size":
5368
- do:

0 commit comments

Comments
 (0)