Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I integrate MongoDB with Solr?

Tags:

php

mongodb

solr

I've seen this question before, but it's never received a real answer- so I was wondering.. Can someone point me in the right direction as to how I can integrate mongoDB with Solr? I'm looking for pseudo real-time and eventual consistency.

Can anyone that's done this shed some light?

I'm also using PHP/Zend with Doctrine Mongo if that helps.

Thanks in advance

like image 345
Andy Tsen Avatar asked Jun 06 '11 04:06

Andy Tsen


1 Answers

I haven't done any integration, and I'm sure you've already googled, but...

http://nosql.mypopescu.com/post/383437318/integrating-mongodb-with-solr

http://blog.knuthaugen.no/2010/04/cooking-with-mongodb-and-solr.html

The issue you are probably going to run into with a "psuedo real-time" solution, depending on your volume, is performance. Solr performance with high commits isn't the greatest. In other words, its not really so much of a real-time indexing solution as it is a batch indexing solution. Depending on what you're actually doing this may or may not be an issue for you.

ElasticSearch (mentioned above) has been making a lot of noise in the blogosphere lately and it has a JSON api, so you might want to look at it if you're using MongoDB. I've run across these performance metrics when doing some research on real-time commits (I've never used ElasticSearch, though).

AFAIK, there is only one (highly dedicated) contributor to ElasticSearch.

like image 94
hross Avatar answered Oct 20 '22 04:10

hross