mirror of
https://github.com/elastic/elasticsearch.git
synced 2025-06-28 17:34:17 -04:00
In the field capabilities API, re-add support for fields
in the request body (#88972)
We previously removed support for `fields` in the request body, to ensure there was only one way to specify the parameter. We've now decided to undo the change, since it was disruptive and the request body is actually the best place to pass variable-length data like `fields`. This PR restores support for `fields` in the request body. It throws an error if the parameter is specified both in the URL and the body. Closes #86875
This commit is contained in:
parent
b81f4187ab
commit
f28f4545b2
6 changed files with 109 additions and 6 deletions
|
@ -121,7 +121,6 @@ setup:
|
|||
|
||||
---
|
||||
"Get simple field caps":
|
||||
|
||||
- do:
|
||||
field_caps:
|
||||
index: 'test1,test2,test3'
|
||||
|
@ -162,6 +161,21 @@ setup:
|
|||
- match: {fields.geo.keyword.indices: ["test3"]}
|
||||
- is_false: fields.geo.keyword.non_searchable_indices
|
||||
- is_false: fields.geo.keyword.on_aggregatable_indices
|
||||
|
||||
---
|
||||
"Get field caps with fields in body":
|
||||
- skip:
|
||||
version: " - 8.4.99"
|
||||
reason: re-added support for fields in the request body in 8.5
|
||||
- do:
|
||||
field_caps:
|
||||
index: 'test1,test2,test3'
|
||||
body:
|
||||
fields: [text]
|
||||
|
||||
- match: {fields.text.text.searchable: true}
|
||||
- match: {fields.text.text.aggregatable: false}
|
||||
- is_false: fields.keyword
|
||||
---
|
||||
"Get date_nanos field caps":
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue