elastic2-doc-manager icon indicating copy to clipboard operation
elastic2-doc-manager copied to clipboard

KeyError: 'found' on Elastic2DocManager when syncing data from MongoDB

Open fjaweihyafei opened this issue 7 years ago • 1 comments

I sync the database with Mongo-Connector using Elastic2DocManager:

mongo-connector -m localhost:27017 -t localhost:9200 -d elastic2_doc_manager After seeing some update on docs.deleted of mongodb_meta on Elastic Search:

health status index uuid pri rep docs.count docs.deleted store.size pri.store.size yellow open mongodb_meta 3wd6OjTT6tD3f6ZGezZw 5 1 1337173 8372 192.9mb 192.9mb mongo-connector stops working with below error:

During handling of the above exception, another exception occurred: ... Exception in thread Thread-1: Traceback (most recent call last): File "c:\programdata\anaconda3\lib\threading.py", line 916, in _bootstrap_inner self.run() File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 150, in run self._docman.send_buffered_operations() File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 482, in send_buffered_operations action_buffer = self.BulkBuffer.get_buffer() File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 696, in get_buffer self.update_sources() File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\util.py", line 35, in wrapped return f(*args, **kwargs) File "c:\programdata\anaconda3\lib\site-packages\mongo_connector\doc_managers\elastic2_doc_manager.py", line 628, in update_sources if ES_doc['found']: KeyError: 'found'

fjaweihyafei avatar Aug 22 '18 02:08 fjaweihyafei

I was having this issue, figured out that it was caused by not having an index corresponding to the mongo database.

asktree avatar Nov 25 '18 06:11 asktree