Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error when some data in mongodb had been updated #6

Open
kendozen opened this issue Mar 5, 2019 · 1 comment
Open

error when some data in mongodb had been updated #6

kendozen opened this issue Mar 5, 2019 · 1 comment

Comments

@kendozen
Copy link

kendozen commented Mar 5, 2019

when updating data,it throw en exception such as behind:

Exception in thread Thread-2:
Traceback (most recent call last):
File "/usr/local/lib/python3.5/threading.py", line 914, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.5/site-packages/mongo_connector/util.py", line 107, in wrapped
func(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/mongo_connector/oplog_manager.py", line 298, in run
entry["o2"]["_id"], entry["o"], ns, timestamp
File "/usr/local/lib/python3.5/site-packages/mongo_connector/util.py", line 33, in wrapped
return f(*args, **kwargs)
File "/usr/local/lib/python3.5/site-packages/solr_doc_manager-0.1.0-py3.5.egg/mongo_connector/doc_managers/solr_doc_manager.py", line 252, in update
doc.pop('ns')
KeyError: 'ns'

so when debuging the source, I found that there's no ns in doc,so after I comment it, it does work.

@AndrewG10i
Copy link

@jekeans it seems that your schema.xml is mis-configured. Make sure that it follows the provided sample.

Particularly these lines should be present:

   <!-- metadata used by mongo-connector -->
   <field name="_ts" type="long" indexed="true" stored="true" required="true" multiValued="false" />
   <field name="ns" type="string" indexed="true" stored="true" required="true" multiValued="false" />

Hope this helps. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants