You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 19, 2024. It is now read-only.
Many documents are removed from Mongo, but they remain in Elastic.
My guess is that Mexp needs the returned documents in order to update them in ES, but the problem is that the remove() method does not return these documents. Its signature is only err.
Workaround
We can make a 2-step delete, with (1) a find() query and (2) delete the returned documents one by one. findOneAndRemove() returns the deleted document, so it can be unindexed.
The text was updated successfully, but these errors were encountered:
Using Mongoose's method
Model.remove()
effectively removes the documents from Mongo, but they remain indexed in Elastic's base.Many documents are removed from Mongo, but they remain in Elastic.
My guess is that Mexp needs the returned documents in order to update them in ES, but the problem is that the
remove()
method does not return these documents. Its signature is onlyerr
.Workaround
We can make a 2-step delete, with (1) a
find()
query and (2) delete the returned documents one by one.findOneAndRemove()
returns the deleted document, so it can be unindexed.The text was updated successfully, but these errors were encountered: