@jbrowse/core
Version:
JBrowse 2 core libraries used by plugins
50 lines (49 loc) • 3.17 kB
TypeScript
import QuickLRU from '../util/QuickLRU/index.ts';
import type BaseResult from './BaseResults.ts';
import type PluginManager from '../PluginManager.ts';
import type { AnyConfigurationModel } from '../configuration/index.ts';
import type { BaseTextSearchAdapter, BaseTextSearchArgs } from '../data_adapters/BaseAdapter/index.ts';
export interface SearchScope {
includeAggregateIndexes: boolean;
assemblyName: string;
tracks?: string[];
}
export default class TextSearchManager {
pluginManager: PluginManager;
adapterCache: QuickLRU<string, BaseTextSearchAdapter>;
constructor(pluginManager: PluginManager);
clearCache(): void;
loadTextSearchAdapters(searchScope: SearchScope): Promise<BaseTextSearchAdapter[]>;
relevantAdapters(searchScope: SearchScope): ({
[x: string]: any;
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
[x: string]: any;
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & any & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("../configuration/types.ts").AnyConfigurationSchemaType>);
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("../configuration/types.ts").AnyConfigurationSchemaType>)[];
getAdaptersWithAssembly(assemblyName: string, confs: AnyConfigurationModel[]): ({
[x: string]: any;
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
[x: string]: any;
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & any & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("../configuration/types.ts").AnyConfigurationSchemaType>);
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("../configuration/types.ts").AnyConfigurationSchemaType>)[];
getTrackAdaptersWithAssembly(assemblyName: string, confs: AnyConfigurationModel[]): ({
[x: string]: any;
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & {
setSubschema(slotName: string, data: Record<string, unknown>): Record<string, unknown> | ({
[x: string]: any;
} & import("@jbrowse/mobx-state-tree/dist/internal").NonEmptyObject & any & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("../configuration/types.ts").AnyConfigurationSchemaType>);
} & import("@jbrowse/mobx-state-tree").IStateTreeNode<import("../configuration/types.ts").AnyConfigurationSchemaType>)[];
search(args: BaseTextSearchArgs, searchScope: SearchScope, rankFn: (results: BaseResult[]) => BaseResult[]): Promise<BaseResult[]>;
search2({ args, searchScope, rankFn, }: {
args: BaseTextSearchArgs;
searchScope: SearchScope;
rankFn: (results: BaseResult[]) => BaseResult[];
}): Promise<BaseResult[]>;
sortResults2({ results, rankFn, args, }: {
results: BaseResult[];
args: BaseTextSearchArgs;
rankFn: (results: BaseResult[]) => BaseResult[];
}): BaseResult[];
}