Skip to content

Commit

Permalink
Merge selected fields with doc_value fields
Browse files Browse the repository at this point in the history
  • Loading branch information
kertal committed Sep 9, 2020
1 parent f84b36d commit 32c0184
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/discover/public/application/angular/discover.js
Original file line number Diff line number Diff line change
Expand Up @@ -948,9 +948,11 @@ function discoverController($element, $route, $scope, $timeout, $window, Promise

$scope.updateDataSource = () => {
const { indexPattern, searchSource } = $scope;
const indexPatternFields = indexPattern.getComputedFields();
const fields = [...$scope.state.columns, ...indexPatternFields.docvalueFields];
searchSource
.setField('index', $scope.indexPattern)
.setField('fields', $scope.state.columns)
.setField('fields', fields)
.setField('source', true)
.setField('size', $scope.opts.sampleSize)
.setField(
Expand Down

0 comments on commit 32c0184

Please sign in to comment.