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