Skip to content

Commit

Permalink
doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Liza K committed Jun 1, 2020
1 parent b990679 commit 0ad9df9
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/plugins/data/public/search/search_service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,8 @@ interface SearchServiceStartDependencies {
}

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

const search: ISearchGeneric = (request, options, strategyName) => {
const { search } = this.getSearchStrategy(strategyName || DEFAULT_SEARCH_STRATEGY);
return this.searchInterceptor.search(search as any, request, options);
const { search: defaultSearch } = this.getSearchStrategy(
strategyName || DEFAULT_SEARCH_STRATEGY
);
return this.searchInterceptor.search(defaultSearch as any, request, options);
};

const legacySearch = {
Expand Down

0 comments on commit 0ad9df9

Please sign in to comment.