import { SearchResponse } from 'elasticsearch' ; import { Search } from '@elastic/elasticsearch/api/requestParams' ; import { IOpenSearchDashboardsSearchRequest , IOpenSearchDashboardsSearchResponse } from '../types' ; export const OPENSEARCH_SEARCH_STRATEGY = 'opensearch' ; export interface ISearchOptions { /**
     * An `AbortSignal` that allows the caller of `search` to abort a search request.
     */ abortSignal ? : AbortSignal ; /**
     * Use this option to force using a specific server side search strategy. Leave empty to use the default strategy.
     */ strategy ? : string ; } export type ISearchRequestParams < T = Record < string , any > > = { trackTotalHits ? : boolean ; } & Search < T > ; export interface IOpenSearchSearchRequest extends IOpenSearchDashboardsSearchRequest < ISearchRequestParams > { indexType ? : string ; } export type IOpenSearchSearchResponse < Source = any > = IOpenSearchDashboardsSearchResponse < SearchResponse < Source > > ;