rwynn / monstache-site

documentation for the monstache project
https://rwynn.github.io/monstache-site/
MIT License
22 stars 31 forks source link

Deleted document from MongoDB, then started Monstache, Monstache did not delete the document from the Elasticsearch index #31

Open jpgklassen opened 1 year ago

jpgklassen commented 1 year ago

I deleted a document from the MongoDB database, then started Monstache. Monstache did not delete the document from the Elasticsearch index. I deleted more documents with Monstache running, and it deleted those from the Elasticsearch index.

oliveiracdz commented 1 year ago

The direct-read-namespaces option allows us to copy entire collections when starting Monstache. But the sync flow is only from MongoDB to ES... In this case, your best option is to drop ES index manually and start Monstache process again.

oliveiracdz commented 1 year ago

@rwynn, when running direct-read-namespaces via a cron job like in this sample, would be useful to drop all ES documents that were deleted from mongoDB.

Is there an option like this already?

rwynn commented 1 year ago

hi @oliveiracdz. there is not an option like this. My only thought would be to delete the index in the same cron job before kicking off the direct reads.