Fix recreate elastic (#6945)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2024-10-15 22:56:49 +05:00 committed by GitHub
parent 288c51aa0d
commit f8f140cc12
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -112,7 +112,7 @@ export async function recreateElastic (
const db = getWorkspaceMongoDB(_client, workspaceId)
await db
.collection(DOMAIN_DOC_INDEX_STATE)
.updateMany({ _class: core.class.DocIndexState }, { $set: { stages: {} } })
.updateMany({ _class: core.class.DocIndexState }, { $set: { stages: {}, needIndex: true } })
await connection.sendForceClose()
} finally {
client.close()