richardwilly98 / elasticsearch-river-mongodb

MongoDB River Plugin for ElasticSearch
1.12k stars 215 forks source link

River not deleting the document which already deleted in Elasticsearch #519

Closed warm200 closed 9 years ago

warm200 commented 9 years ago

I am looking for the idea, that I use the delete command on my server backend, which is deleting document from elasticsearch, at first it all functions well, but when I checked the mongodb, they are all there, river is not sync when deleting document on elasticsearch,Further more, when I directly delete stuff on mongodb, it did work on elasticsearch, which mean it just function well one way .I have no idea which part is wrong. I implement the relpset on one instance "rs0" ,does it matter?

ewgRa commented 9 years ago

when deleting document on elasticsearch

There is master-slave replication. Mongo > ES. If you delete something in ES, it will be not deleted in Mongo.

warm200 commented 9 years ago

thanks ewgRa, so in pratice, like your said, ES is like a master and mongodb like a slave? Am i right? and it's supposed to delete data in mongo side no just in ES side?

ewgRa commented 9 years ago

vice versa

ES is a slave, Mongo is a master.

ES just read Mongo oplog.

warm200 commented 9 years ago

Oh, sorry I was supposed to say mongdb is a master, so ES can read what's updated in the oplog. got it, thank you ewgRa,

ewgRa commented 9 years ago

you welcome. please close issue.