Fix merging of search_as_you_type field mapper#40593
Merged
jimczi merged 2 commits intoelastic:masterfrom Mar 29, 2019
Merged
Conversation
The merge of the `search_as_you_type` field mapper uses the wrong prefix field and does not update the underlying field types.
Collaborator
|
Pinging @elastic/es-search |
| this.prefixField = (PrefixFieldMapper) this.prefixField.merge(mw); | ||
| if (prefixField.equals(mw.prefixField) == false) { | ||
| this.prefixField = (PrefixFieldMapper) this.prefixField.merge(mw.prefixField); | ||
| } |
Contributor
There was a problem hiding this comment.
Should we use this same logic for the shingle fields below (i.e. only merge if they're unequal)?
Contributor
Author
There was a problem hiding this comment.
it's a leftover, we should always merge, I removed the test
| subIterators.addAll(Arrays.asList(shingleFields)); | ||
| @SuppressWarnings("unchecked") Iterator<Mapper> concat = Iterators.concat(super.iterator(), subIterators.iterator()); | ||
| return concat; | ||
| return Iterators.concat(super.iterator(), subIterators.iterator()); |
Contributor
There was a problem hiding this comment.
It looks like we fail compilation on the warning from the call to Iterators.concat here
Contributor
Author
There was a problem hiding this comment.
yep I restored the original
andyb-elastic
approved these changes
Mar 28, 2019
Contributor
andyb-elastic
left a comment
There was a problem hiding this comment.
LGTM thanks for catching this
jimczi
added a commit
that referenced
this pull request
Mar 29, 2019
The merge of the `search_as_you_type` field mapper uses the wrong prefix field and does not update the underlying field types.
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Mar 29, 2019
* elastic/master: (77 commits) Update ingest jdocs that a null return value will drop the current document. (elastic#40359) Remove -Xlint exclusions in the ingest-common module. (elastic#40505) Update docs for the DFR similarity (elastic#40579) Fix merging of search_as_you_type field mapper (elastic#40593) Support roles with application privileges against wildcard applications (elastic#40398) Remove obsolete security settings (elastic#40496) Remove Gradle deprecation warnings (elastic#40449) Run the build integ test in parallel (elastic#39788) Fix 3rd pary S3 tests (elastic#40588) lower bwc skip for search as you type (elastic#40599) Muting XContentParserTests#testSubParserArray Fixing typo in test error message (elastic#40611) Update max dims for vectors to 1024. (elastic#40597) Add start and stop time to cat recovery API (elastic#40378) [DOCS] Correct keystore commands for Email and Jira actions in Watcher (elastic#40417) [DOCS] Document common settings for snapshot repository plugins (elastic#40475) Remove with(out)-system-key tests (elastic#40547) Geo Point parse error fix (elastic#40447) Handle null retention leases in WaitForNoFollowersStep (elastic#40477) [DOCS] Adds anchors for ruby client (elastic#39867) ...
jasontedor
added a commit
to jasontedor/elasticsearch
that referenced
this pull request
Mar 29, 2019
* elastic/master: (129 commits) Update ingest jdocs that a null return value will drop the current document. (elastic#40359) Remove -Xlint exclusions in the ingest-common module. (elastic#40505) Update docs for the DFR similarity (elastic#40579) Fix merging of search_as_you_type field mapper (elastic#40593) Support roles with application privileges against wildcard applications (elastic#40398) Remove obsolete security settings (elastic#40496) Remove Gradle deprecation warnings (elastic#40449) Run the build integ test in parallel (elastic#39788) Fix 3rd pary S3 tests (elastic#40588) lower bwc skip for search as you type (elastic#40599) Muting XContentParserTests#testSubParserArray Fixing typo in test error message (elastic#40611) Update max dims for vectors to 1024. (elastic#40597) Add start and stop time to cat recovery API (elastic#40378) [DOCS] Correct keystore commands for Email and Jira actions in Watcher (elastic#40417) [DOCS] Document common settings for snapshot repository plugins (elastic#40475) Remove with(out)-system-key tests (elastic#40547) Geo Point parse error fix (elastic#40447) Handle null retention leases in WaitForNoFollowersStep (elastic#40477) [DOCS] Adds anchors for ruby client (elastic#39867) ...
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The merge of the
search_as_you_typefield mapper uses the wrong prefix fieldand does not update the underlying field types.