Skip to content

Commit 5e81400

Browse files
author
Maja Grubic
committed
[Search Embeddable] Add highlighting when searching
1 parent c502e4c commit 5e81400

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

src/plugins/discover/public/application/embeddable/search_embeddable.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,11 @@ export class SearchEmbeddable
389389
if (forceFetch || isFetchRequired) {
390390
this.filtersSearchSource!.setField('filter', this.input.filters);
391391
this.filtersSearchSource!.setField('query', this.input.query);
392+
if (this.input.query?.query || this.input.filters?.length) {
393+
this.filtersSearchSource!.setField('highlightAll', true);
394+
} else {
395+
this.filtersSearchSource!.removeField('highlightAll');
396+
}
392397

393398
this.prevFilters = this.input.filters;
394399
this.prevQuery = this.input.query;

0 commit comments

Comments
 (0)