-
Notifications
You must be signed in to change notification settings - Fork 25k
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
In field retrieval API, handle non-standard source paths. #55889
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -602,6 +602,14 @@ public Set<String> simpleMatchToFullName(String pattern) { | |
return fieldTypes.simpleMatchToFullName(pattern); | ||
} | ||
|
||
/** | ||
* Given a field name, returns its possible paths in the _source. For example, | ||
* the 'source path' for a multi-field is the path to its parent field. | ||
*/ | ||
public Set<String> sourcePath(String fullName) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder if this should return something that has an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will keep this in mind in the next PR where we'll handle field-specific behavior like formatting. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
return fieldTypes.sourcePaths(fullName); | ||
} | ||
|
||
/** | ||
* Returns all mapped field types. | ||
*/ | ||
|
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 you can set up
copy_to
the same field multiple times. I imagine this won't perfectly emulate that. But that is almost certainly ok.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 also think it's okay not to emulate that.