solr Data Import Handlers for MongoDB

前端 未结 3 1268
既然无缘
既然无缘 2020-12-16 01:34

I am working on a project where we have millions of entries stored in MongoDB database and, i want to index all this data using SOLR.

After extensive Searching i cam

3条回答
  •  悲&欢浪女
    2020-12-16 01:52

    I wrote a response to a similar question, except it was how to import data from MySQL into SOLR. The example code is in PHP, but should give you a general idea. All you would need to do is set up an iterator to step through your MongoDB assets, extract the data to SOLR datatypes, and then save it to your SOLR index.

    If you want it to be real-time, you could add some custom code to the save mechanism (assuming this can be done with MongoDB), and save directly to the SOLR index, then run a commit script to commit data every 15 minutes (via cron).

提交回复
热议问题