Add back support for enabled/includes/excludes in _source field#11171
Merged
rjernst merged 2 commits intoelastic:masterfrom May 14, 2015
Merged
Add back support for enabled/includes/excludes in _source field#11171rjernst merged 2 commits intoelastic:masterfrom
enabled/includes/excludes in _source field#11171rjernst merged 2 commits intoelastic:masterfrom
Conversation
This adds back the ability to disable _source, as well as set includes and excludes. However, it also restricts these settings to not be updateable. enabled was actually already not modifiable, but no conflict was previously given if an attempt was made to change it. This also adds a check that can be made on the source mapper to know if the the source is "complete" and can be used for purposes other than returning in search or get requests. There is one example use here in highlighting, but more need to be added in a follow up issue (eg in the update API). closes elastic#11116
Contributor
There was a problem hiding this comment.
I think we should also emit conflicts if simulate is false?
Member
Author
There was a problem hiding this comment.
I was just following what I saw other mappers doing. Really I think merge should be split into two separate methods, one for validating updates, and the other for applying them?
Contributor
There was a problem hiding this comment.
In my dreams, merging would either throw an exception or return a new independent mapping so that we wouldn't need this validation phase :)
Member
Author
|
@jpountz I pushed a commit simplifying includes/excludes so they can no longer be null. |
Contributor
|
LGTM |
rjernst
added a commit
that referenced
this pull request
May 14, 2015
Mappings: Add back support for enabled/includes/excludes in _source
Contributor
|
Many thanks! -- Uwe |
Contributor
|
@rjernst Thanks! |
enabled/includes/excludes in _source field
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.
This adds back the ability to disable _source, as well as set includes
and excludes. However, it also restricts these settings to not be
updateable. enabled was actually already not modifiable, but no
conflict was previously given if an attempt was made to change it.
This also adds a check that can be made on the source mapper to
know if the the source is "complete" and can be used for
purposes other than returning in search or get requests. There is
one example use here in highlighting, but more need to be added
in a follow up issue (eg in the update API).
closes #11116