Mongodb 将mongo连接器限制为特定集合以进行Solr索引

Mongodb 将mongo连接器限制为特定集合以进行Solr索引,mongodb,solr,indexing,connector,Mongodb,Solr,Indexing,Connector,我目前正在尝试使用mongo connector自动向Solr提供数据库更新。通过使用以下命令,它可以正常工作- mongo-connector -m localhost:27017 -t http://localhost:8983/solr -d mongo_connector/doc_managers/solr_doc_manager.py 然而,它正在为我的mongodb中的每个集合编制索引。我已通过以下方式尝试使用选项-n- mongo-connector -m localhost:2

我目前正在尝试使用mongo connector自动向Solr提供数据库更新。通过使用以下命令,它可以正常工作-

mongo-connector -m localhost:27017 -t http://localhost:8983/solr -d mongo_connector/doc_managers/solr_doc_manager.py
然而,它正在为我的mongodb中的每个集合编制索引。我已通过以下方式尝试使用选项-n-

mongo-connector -m localhost:27017 -t http://localhost:8983/solr -n feed_scraper_development.articles -d mongo_connector/doc_managers/solr_doc_manager.py
此操作失败,出现以下错误-

2014-07-24 22:23:23,053 - INFO - Beginning Mongo Connector
2014-07-24 22:23:23,104 - INFO - Starting new HTTP connection (1): localhost
2014-07-24 22:23:23,110 - INFO - Finished 'http://localhost:8983/solr/admin/luke?show=schema&wt=json' (get) with body '' in 0.018 seconds.
2014-07-24 22:23:23,115 - INFO - OplogThread: Initializing oplog thread
2014-07-24 22:23:23,116 - INFO - MongoConnector: Starting connection thread MongoClient('localhost', 27017)
2014-07-24 22:23:23,126 - INFO - Finished 'http://localhost:8983/solr/update/?commit=true' (post) with body 'u'<commit ' in 0.006 seconds.
2014-07-24 22:23:23,129 - INFO - Finished 'http://localhost:8983/solr/select/?q=%2A%3A%2A&sort=_ts+desc&rows=1&wt=json' (get) with body '' in 0.003 seconds.
2014-07-24 22:23:23,337 - INFO - Finished 'http://localhost:8983/solr/select/?q=_ts%3A+%5B6038164010275176560+TO+6038164010275176560%5D&rows=100000000&wt=json' (get) with body '' in 0.207 seconds.
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 808, in __bootstrap_inner
    self.run()
  File "build/bdist.macosx-10.9-intel/egg/mongo_connector/oplog_manager.py", line 141, in run
    cursor = self.init_cursor()
  File "build/bdist.macosx-10.9-intel/egg/mongo_connector/oplog_manager.py", line 582, in init_cursor
    cursor = self.get_oplog_cursor(timestamp)
  File "build/bdist.macosx-10.9-intel/egg/mongo_connector/oplog_manager.py", line 361, in get_oplog_cursor
    timestamp = self.rollback()
  File "build/bdist.macosx-10.9-intel/egg/mongo_connector/oplog_manager.py", line 664, in rollback
    if doc['ns'] in rollback_set:
KeyError: 'ns'
2014-07-24 22:23:23053-信息-开始使用Mongo连接器
2014-07-24 22:23:23104-信息-启动新的HTTP连接(1):本地主机
2014-07-24 22:23:23110-信息-完成'http://localhost:8983/solr/admin/luke?show=schema&wt=json在0.018秒内获取具有正文“”的“”。
2014-07-24 22:23:23115-信息-oplog线程:初始化oplog线程
2014-07-24 22:23:23116-信息-MongoConnector:启动连接线程MongoClient('localhost',27017)

2014-07-24 22:23:23126-信息-完成'http://localhost:8983/solr/update/?commit=true“(post)正文为'u'在删除数据文件夹中的所有索引、重新启动solr并使用-n选项重新运行命令后,它将按照公告的方式工作。

我可以知道,您在哪个文档中找到了-n选项吗?