feat: introduce fuzzy search for native indexer (#14109)

This commit is contained in:
DarkSky
2025-12-25 04:40:23 +08:00
committed by GitHub
parent b6dc68eddf
commit e8693a3a25
24 changed files with 237 additions and 537 deletions

View File

@@ -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;

View File

@@ -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,