@jbrowse/core
Version:
JBrowse 2 core libraries used by plugins
34 lines (33 loc) • 2.18 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[]): AnyConfigurationModel[];
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[]>;
sortResults(results: BaseResult[], rankFn: (results: BaseResult[]) => BaseResult[]): BaseResult[];
}