Restore _source fetching behavior#7751
Merged
Bargs merged 1 commit intoelastic:masterfrom Jul 14, 2016
Merged
Conversation
Kibana used to always include a `fields` parameter on Discover search requests which included '_source' so that ES would return the _source field for each hit. When ES removed the `fields` param we attempted to switch to a new request body param `_source: true` to maintain the same behavior. However, we missed one spot in the code that needed updating in order to pass that param along to the actual request json. This problem wasn't immediately obvious because _source is included by default. However, this fixes a related issue where _source fields were missing in Discover if any scripted fields existed. The presence of the `script_fields` param in the request would disabled the automatic return of _source. Now that we're correctly passing `_source: true`, _source fetching works correctly even when scripted fields are present. Fixes elastic#7699
Contributor
Author
|
Amended my commit to include stored_fields as well. Now I think this should be functionally equivalent to what we had before. |
Contributor
|
LGTM |
1 similar comment
Contributor
|
LGTM |
airow
pushed a commit
to airow/kibana
that referenced
this pull request
Feb 16, 2017
Restore _source fetching behavior Former-commit-id: 33b3c45
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.
Kibana used to always include a
fieldsparameter on Discover searchrequests which included '_source' so that ES would return the _source
field for each hit. When ES removed the
fieldsparam we attempted toswitch to a new request body param
_source: trueto maintain thesame behavior. However, we missed one spot in the code that needed
updating in order to pass that param along to the actual request json.
This problem wasn't immediately obvious because _source is included by
default. However, this fixes a related issue where _source fields were
missing in Discover if any scripted fields existed. The presence of the
script_fieldsparam in the request would disabled the automatic returnof _source. Now that we're correctly passing
_source: true, _sourcefetching works correctly even when scripted fields are present.
Fixes #7699