Skip to content

Conversation

@romseygeek
Copy link
Contributor

#63214 made TypeFieldType a constant field, and fixed things so that it always
emits deprecation warnings whenever it is referenced in a query or aggregation.
However, it also emits warnings when it is used to build a type filter through
the search context; this is unnecessary, as warnings are already emitted by
the REST layer when types are specified as part of the URL, and it is causing
failures in some BWC tests.

This commit adds a specialised typeFilter method to TypeFieldType to handle
this case without emitted any extra warnings. It also removes an unused duplicate
TypeFieldType class that resulted from a backport merge error.

Fixes #63366

@romseygeek romseygeek added >non-issue :Search Foundations/Mapping Index mappings, including merging and defining field types v7.10.0 labels Oct 7, 2020
@romseygeek romseygeek requested a review from imotov October 7, 2020 09:28
@romseygeek romseygeek self-assigned this Oct 7, 2020
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Mapping)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Oct 7, 2020
@romseygeek
Copy link
Contributor Author

Marked as non-issue because it is unreleased.

Copy link
Contributor

@imotov imotov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you for a quick turn around!

@romseygeek romseygeek merged commit b344d67 into elastic:7.x Oct 7, 2020
@romseygeek romseygeek deleted the types-removal/type-filter-7x branch October 7, 2020 14:55
romseygeek added a commit that referenced this pull request Oct 7, 2020
#63214 made TypeFieldType a constant field, and fixed things so that it always
emits deprecation warnings whenever it is referenced in a query or aggregation.
However, it also emits warnings when it is used to build a type filter through
the search context; this is unnecessary, as warnings are already emitted by
the REST layer when types are specified as part of the URL, and it is causing
failures in some BWC tests.

This commit adds a specialised typeFilter method to TypeFieldType to handle
this case without emitted any extra warnings. It also removes an unused duplicate
TypeFieldType class that resulted from a backport merge error.

Fixes #63366
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

>non-issue :Search Foundations/Mapping Index mappings, including merging and defining field types Team:Search Meta label for search team v7.10.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants