GET operations should not extract fields from _source
.
#20158
Merged
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 makes GET operations more consistent with
_search
operations which expect(stored_)fields
to work on stored fields and source filtering to work on the_source
field. This is now possible thanks to the fact that GET operationsdo not read from the translog anymore (#20102) and also allows to get rid of
FieldMapper#isGenerated
.The
_termvectors
API (and thus more_like_this too) was relying on the factthat GET operations would extract fields from either stored fields or the source
so the logic to do this that used to exist in
ShardGetService
has been movedto
TermVectorsService
. It would be nice that term vectors do not rely on this,but this does not seem to be a low hanging fruit.
Relates to #15017 which did the same for the
_search
API.