Skip to content

Commit

Permalink
[Maps] Support runtime fields in tooltips (#84377) (#84709)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasneirynck authored Dec 1, 2020
1 parent 414d91b commit b4738be
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -487,8 +487,14 @@ export class ESSearchSource extends AbstractESSource implements ITiledSingleLaye
return {};
}

const { docValueFields } = getDocValueAndSourceFields(
indexPattern,
this._getTooltipPropertyNames()
);

const initialSearchContext = { docvalue_fields: docValueFields }; // Request fields in docvalue_fields insted of _source
const searchService = getSearchService();
const searchSource = searchService.searchSource.createEmpty();
const searchSource = await searchService.searchSource.create(initialSearchContext as object);

searchSource.setField('index', indexPattern);
searchSource.setField('size', 1);
Expand Down

0 comments on commit b4738be

Please sign in to comment.