🔎 fix: Include Legacy Documents With Undefined _meiliIndex in Search Sync (#11745)

* fix: document with undefined _meiliIndex not synced

missing property _meiliIndex is not being synced into meilisearch

* fix: updated comments to reflect changes to fix_meiliSearch property usage
This commit is contained in:
Andrei Blizorukov 2026-02-13 00:05:53 +01:00 committed by GitHub
parent e3a60ba532
commit 793ddbce9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 245 additions and 8 deletions

View file

@ -26,7 +26,7 @@ async function batchResetMeiliFlags(collection) {
try {
while (hasMore) {
const docs = await collection
.find({ expiredAt: null, _meiliIndex: true }, { projection: { _id: 1 } })
.find({ expiredAt: null, _meiliIndex: { $ne: false } }, { projection: { _id: 1 } })
.limit(BATCH_SIZE)
.toArray();