-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Override doc_value parameter in Spatial XPack module #53286
Closed
Closed
Changes from 1 commit
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think the parser-extension part of this PR is needed. I think that the lack of
doc_values
parsing support in the field mapper is a bug in our field-mapper infrastructure, not a feature that needs to be extended by a plugin.I would want to see the equivalent to this PR: #47519 getting merged into master, so that this PR can focus on the Indexer extension points. what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That would work except the builder is not overridden in xpack. It's the responsibility of the parser-extension (
parser.config
) to throw "doc values not supported" exceptions at mapping time as opposed to throwing them at index time. So when geo_shape doc values are moved to xpack we will want OSS behavior to remain the same (throwing doc values not supported exceptions) and xpack to implement them.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so these handlers must be passed in, but can we re-use the data-handler for this instead of creating a generic parsing abstraction? Would it be better to limit scope to just changing how doc-values are parsed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I originally had it that way but changed it because the data handler logic is specific to
GeoShapeFieldMapper
only (since index logic for bothShapeFieldMapper
andLegacyGeoShapeFieldMapper
is untouched). But parsing logic needs to be handled by bothGeoShapeFieldMapper
andShapeFieldMapper
so it was elevated to theAbstractGeometryFieldMapper
in order to share the implementation (and not duplicate inShapeFieldMapper
).This is just the start to the "tangled mess" I was referring to in today's meeting. It gets more hairy when projections (
Geo3DPoint
XYPoint
LatLonPoint
) are brought in the fray.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it work if there were dummy data-handlers/indexers unique for ShapeFieldMapper and LegacyGeoShapeFieldMapper?
regardless of how the extension point is implemented, I feel like it is important that all these field mappers understand how to parse and proclaim their lack of support for doc-values.
Do you see any reason why I should not add support for parsing
doc_values
to server's implementation?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the implementation is mostly based on preference? I don't see a reason to not add support for parsing doc_values in server's implementation (and throwing a
MapperParsingException
in OSS deployments). I ultimately didn't go this route because I liked the existing behavior where unimplemented parameters are handled further upstream.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like @talevy I have a preference for not making parsing pluggable. We might need to reconsider in the future with projections, but I'd like to explore the path that requires the least amount of new abstractions for now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I opened #53351 to support parsing
doc_values
. There are two places I left TODO comments where I'd like to be sure this data-handler branch can properly hook into things.let me know what you think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 I cherry-picked #53351 and wired up the data handler. Next will make the change to not register the default data handler unless no plugins are installed.