fix analyzer lookup when field name contains dot #1496
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
At query time, we sometimes attempt to lookup the correct
analyzer for a field. When doing so, the "." character can
be interpretted as a path separater. Doing this can result
in lookup failure in cases where the user specified a field
name which also contains a dot.
This fix addresses the case where the path contains a dot,
but the next element does not match a mapping at this level.
Previously this ended all looukp in this mapping, now we
attempt to match the remaining path as a whole, without
splitting on the dot.
This fix is intended to fix most common cases where a user has
given a field a name with a dot. However, ambigutities
between custom field names containing dots, and actual mapping
paths can still happen, and must be manually avoided.