feat: refresh index if version changed (#14150)

This commit is contained in:
DarkSky
2025-12-26 01:08:05 +08:00
committed by GitHub
parent e8693a3a25
commit 2e38898937
19 changed files with 57 additions and 19 deletions

View File

@@ -184,4 +184,5 @@ export interface NbStorePlugin {
query: string;
}) => Promise<Array<{ start: number; end: number }>>;
ftsFlushIndex: (options: { id: string }) => Promise<void>;
ftsIndexVersion: () => Promise<number>;
}

View File

@@ -406,4 +406,7 @@ export const NbStoreNativeDBApis: NativeDBApis = {
id,
});
},
ftsIndexVersion: function (): Promise<number> {
return NbStore.ftsIndexVersion();
},
};