-
Notifications
You must be signed in to change notification settings - Fork 25.6k
Fix match_only_text bugs if defined as multi-field #130188
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
Conversation
Bugs starting to occur when elastic#129126 was merged. Closes elastic#129737
|
Pinging @elastic/es-storage-engine (Team:StorageEngine) |
| if (searchExecutionContext.isSourceSynthetic()) { | ||
| if (searchExecutionContext.isSourceSynthetic() && withinMultiField == false && hasCompatibleMultiFields == false) { | ||
| String name = storedFieldNameForSyntheticSource(); | ||
| // TODO: go the parent field and load either via stored fields or doc values the values instead synthesizing complete source |
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.
| // TODO: go the parent field and load either via stored fields or doc values the values instead synthesizing complete source | |
| // TODO: go the parent field and load either via stored fields or doc values, instead of synthesizing the complete source. |
| if (searchExecutionContext.isSourceSynthetic() && withinMultiField == false && hasCompatibleMultiFields == false) { | ||
| String name = storedFieldNameForSyntheticSource(); | ||
| // TODO: go the parent field and load either via stored fields or doc values the values instead synthesizing complete source | ||
| // (in case of synthetic source and if this field is a multi field, then it will not have a stored field.) |
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.
| // (in case of synthetic source and if this field is a multi field, then it will not have a stored field.) | |
| // In case of synthetic source and if this field is a multi field, then it will not have a stored field. |
| ); | ||
| } | ||
| if (searchExecutionContext.isSourceSynthetic()) { | ||
| if (searchExecutionContext.isSourceSynthetic() && withinMultiField == false && hasCompatibleMultiFields == false) { |
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.
Nit: these two variables are only used here? If so, replace them with one?
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.
This is actually for the follow up. When there is a keyword multi field then doc values or stored field of the multi field is used, otherwise if stored field / doc values of parent keyword field is used.
| if (searchExecutionContext.isSourceSynthetic()) { | ||
| if (searchExecutionContext.isSourceSynthetic() && withinMultiField == false && hasCompatibleMultiFields == false) { | ||
| String name = storedFieldNameForSyntheticSource(); | ||
| // TODO: go the parent field and load either via stored fields or doc values the values instead synthesizing complete source |
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.
Does this comment belong to the next block that invokes SourceProvider?
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.
Yes, the values would be loaded via source provider, which is slow. I will fix this.
| } | ||
| ); | ||
| } else { | ||
| var kwd = TextFieldMapper.SyntheticSourceHelper.getKeywordFieldMapperForSyntheticSource(this); |
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.
Is keyword the only multifield combination with match_only_text?
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.
Yes, in other cases the match_only_text field will be stored.
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.
A few comments, but approving to get you going.
…tored field or doc values of parent keyword field or stored field or doc values of multi field.
* Fix match_only_text bugs if defined as multi-field Bugs starting to occur when elastic#129126 was merged. Closes elastic#129737
💔 Backport failed
You can use sqren/backport to manually backport by running |
Backporting elastic#130188 to 8.19 branch. Bugs starting to occur when elastic#129126 was merged. Closes elastic#129737
* Fix match_only_text bugs if defined as multi-field Bugs starting to occur when elastic#129126 was merged. Closes elastic#129737
Bugs starting to occur when #129126 was merged.
Closes #129737
This is a bug, but marking as non-issue. Given that it has not been released in a stateful release.