Skip to content

Handle unmapped fields in _field_caps API (#34071)#41426

Merged
jimczi merged 1 commit intoelastic:7.xfrom
jimczi:backport/field_cap_return_indices
Apr 25, 2019
Merged

Handle unmapped fields in _field_caps API (#34071)#41426
jimczi merged 1 commit intoelastic:7.xfrom
jimczi:backport/field_cap_return_indices

Conversation

@jimczi
Copy link
Copy Markdown
Contributor

@jimczi jimczi commented Apr 23, 2019

Backport of #34071

Today the `_field_caps` API returns the list of indices where a field
is present only if this field has different types within the requested indices.
However if the request is an index pattern (or an alias, or both...) there
is no way to infer the indices if the response contains only fields that have
the same type in all indices. This commit changes the response to always return
the list of indices in the response. It also adds a way to retrieve unmapped field
in a specific section per field called `unmapped`. This section is created for each field
that is present in some indices but not all if the parameter `include_unmapped` is set to
true in the request (defaults to false).
@jimczi jimczi merged commit 6184efa into elastic:7.x Apr 25, 2019
@jimczi jimczi deleted the backport/field_cap_return_indices branch April 25, 2019 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant