Skip to content

Add optional query param in _field_caps to return only fields with value in index #2413

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions output/openapi/elasticsearch-serverless-openapi.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 21 additions & 1 deletion output/schema/schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions output/typescript/types.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions specification/_global/field_caps/FieldCapabilitiesRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,13 @@ export interface Request extends RequestBase {
* @availability serverless
*/
types?: string[]
/**
* If false, empty fields are not included in the response.
* @availability stack since=8.13.0
* @availability serverless
* @server_default true
*/
include_empty_fields?: boolean
}
body: {
/**
Expand Down
5 changes: 5 additions & 0 deletions specification/_json_spec/field_caps.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@
"types": {
"type": "list",
"description": "Only return results for fields that have one of the types in the list"
},
"include_empty_fields": {
"type": "boolean",
"default": true,
"description": "Indicates whether empty fields should be included in the response."
}
},
"body": {
Expand Down