Skip to content

Commit 0ad9df9

Browse files
author
Liza K
committed
doc
1 parent b990679 commit 0ad9df9

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/plugins/data/public/search/search_service.ts

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,8 @@ interface SearchServiceStartDependencies {
5454
}
5555

5656
/**
57-
* The search plugin exposes two registration methods for other plugins:
58-
* - registerSearchStrategyProvider for plugins to add their own custom
59-
* search strategies
60-
* - registerSearchStrategyContext for plugins to expose information
61-
* and/or functionality for other search strategies to use
57+
* The search plugin exposes a method `registerSearchStrategy` for other plugins
58+
* to add their own custom search strategies.
6259
*
6360
* It also comes with two search strategy implementations - SYNC_SEARCH_STRATEGY and ES_SEARCH_STRATEGY.
6461
*/
@@ -140,8 +137,10 @@ export class SearchService implements Plugin<ISearchSetup, ISearchStart> {
140137
const aggTypesStart = this.aggTypesRegistry.start();
141138

142139
const search: ISearchGeneric = (request, options, strategyName) => {
143-
const { search } = this.getSearchStrategy(strategyName || DEFAULT_SEARCH_STRATEGY);
144-
return this.searchInterceptor.search(search as any, request, options);
140+
const { search: defaultSearch } = this.getSearchStrategy(
141+
strategyName || DEFAULT_SEARCH_STRATEGY
142+
);
143+
return this.searchInterceptor.search(defaultSearch as any, request, options);
145144
};
146145

147146
const legacySearch = {

0 commit comments

Comments
 (0)