Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 Former-commit-id: 1cd6eec
- Loading branch information