简体   繁体   中英

elasticsearch: resyncing the indexes from mongodb

I have following situation need some help:

  • running mongodb replicaSet with 3 instances having multiple dbs and collections
  • running elasticsearch
  • in order to trigger sync between elasticsearch and mongodb i run the following command >mongo-connector -m 127.0.0.1:27017 -t 127.0.0.1:9200 -d elastic2_doc_manager And it worked perfectly all the data from mongodb synced to elasticsearch nice and sweet.
  • things were working in perfect harmony....
  • till the time i deleted all indices from elastic search for resolving another problem.

Problem: As i deleted all the indices from my elasticsearch. when i re run this command >mongo-connector -m 127.0.0.1:27017 -t 127.0.0.1:9200 -d elastic2_doc_manager it doesnt sync data from mongodb to elasticsearch. I also tried mongo-connector -m localhost:27017 -t localhost:9200 -d elastic2_doc_manager -n {db}.{collection_name} -g {djangodb}.{spiderCollection1} But it doesnt work.

What can i do to retrigger the sync of collections/documents in elasticsearch from mongodb? Or how can i perform re-syncing of data from mongodb to elasticsearch

no versions of db or elasticsearch has been changed/modified.

Will appreciate your help.

Thanks,

Worked, by recreating the db in the mongodb again. But if any one knows anyother alternative workaround, please feelfree to share without having to create the db again in mongodb. thanks,

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM