import { RequestContext } from '@vendure/core'; import { BetterSearchInput, BetterSearchResultList } from '../api/generated/graphql'; import { BetterSearchConfig } from '../types'; import { IndexService } from './index.service'; export declare class SearchService { private indexService; private options; /** * In memory cache of created indices */ private cachedIndices; private indexTtl; constructor(indexService: IndexService, options: BetterSearchConfig); search(ctx: RequestContext, input: BetterSearchInput): Promise; /** * Get index from cache or from DB. * Uses Stale-while-revalidate pattern: uses an outdated index if it exists, * but fetches a new one from DB in the background. */ private getIndex; }