fix: search service to use replaceAllObjects method

Signed-off-by: Innei <i@innei.in>
This commit is contained in:
Innei
2024-01-31 12:48:10 +08:00
parent c4a27cc25a
commit 00964c3822

View File

@@ -262,9 +262,8 @@ export class SearchService {
documents.push(...documents_)
})
try {
await index.clearObjects()
await Promise.all([
index.saveObjects(documents, {
index.replaceAllObjects(documents, {
autoGenerateObjectIDIfNotExist: false,
}),
index.setSettings({