mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
feat: introduce fuzzy search for native indexer (#14109)
This commit is contained in:
@@ -171,7 +171,7 @@ export interface NbStorePlugin {
|
||||
id: string;
|
||||
indexName: string;
|
||||
query: string;
|
||||
}) => Promise<{ id: string; score: number }[]>;
|
||||
}) => Promise<{ id: string; score: number; terms: Array<string> }[]>;
|
||||
ftsGetDocument: (options: {
|
||||
id: string;
|
||||
indexName: string;
|
||||
|
||||
@@ -369,7 +369,7 @@ export const NbStoreNativeDBApis: NativeDBApis = {
|
||||
id: string,
|
||||
indexName: string,
|
||||
query: string
|
||||
): Promise<{ id: string; score: number }[]> {
|
||||
): Promise<{ id: string; score: number; terms: Array<string> }[]> {
|
||||
return await NbStore.ftsSearch({
|
||||
id,
|
||||
indexName,
|
||||
|
||||
Reference in New Issue
Block a user