Skip to content

Add isFieldMapped method to QueryShardContext (#63322) #63535

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 1 commit into from
Oct 12, 2020

Conversation

javanna
Copy link
Member

@javanna javanna commented Oct 12, 2020

This is the backport of #63322

As part of #63239 we have moved some usages of QueryShardContext#getMapperService that were looking up a field type through the fieldType method, to use the existing QueryShardContext#fieldMapper. The latter though has additional handling for unmapped fields when the functionality is enabled, and may throw exception if the field is not mapped. This additional behaviour is not desirable and may cause issues in cases where the callers have their own specific handling for situations where the field is not mapped.

To address this we introduce an additional isFieldMapped method to QueryShardContext that allows to check if a field is mapped or not.

relates to #63239

As part of elastic#63239 we have moved some usages of QueryShardContext#getMapperService that were looking up a field type through the fieldType method, to use the existing QueryShardContext#fieldMapper. The latter though has additional handling for unmapped fields when the functionality is enabled, and may throw exception if the field is not mapped. This additional behaviour is not desirable and may cause issues in cases where the callers have their own specific handling for situations where the field is not mapped.

To address this we introduce an additional isFieldMapped method to QueryShardContext that allows to check if a field is mapped or not.

relates to elastic#63239
@javanna
Copy link
Member Author

javanna commented Oct 12, 2020

run elasticsearch-ci/packaging-sample-windows

@javanna javanna merged commit 3e095e8 into elastic:7.x Oct 12, 2020
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