Skip to main content

SqliteSearchStrategy

SqliteSearchStrategy

A rather naive search for SQLite / SQL.js. Rather than proper full-text searching, it uses a weighted LIKE "%term%" operator instead.

Signature
class SqliteSearchStrategy implements SearchStrategy {
init(injector: Injector) => ;
getFacetValueIds(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<Map<ID, number>>;
getCollectionIds(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<Map<ID, number>>;
getSearchResults(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<SearchResult[]>;
getTotalCount(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<number>;
}

init

method
(injector: Injector) =>

getFacetValueIds

method
(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<Map<ID, number>>

getCollectionIds

method
(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<Map<ID, number>>

getSearchResults

method
(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<SearchResult[]>

getTotalCount

method
(ctx: RequestContext, input: SearchInput, enabledOnly: boolean) => Promise<number>