solr or sphinx? which is better? [duplicate]
Possible Duplicate:
Choosing a stand-alone full-text search server: Sphinx or SOLR?
I will use it to do full text search in my ruby on rails app.
which is the best choice.
solr use java to do this job. or sphix in ruby?
I have no experience with Solr, but Sphinx is easy to install, fast and works great with Thinking Sphinx: http://freelancing-god.github.com/ts/en/indexing.html
There is also a good railscast: http://railscasts.com/episodes/120-thinking-sphinx
This guy gives you some arguments why to go with Sphinx: http://jamesgolick.com/tags/ultrasphinx.html (He uses the Ultrasphinx plugin to connect Rails and Sphinx. I tried both and ended up using Thinking Sphinx)
You can find a comparison of both plugins here: http://reinh.com/blog/2008/07/14/a-thinking-mans-sphinx.html
Solr may be implemented in Java but that is mostly an implementation detail. Sphinx is C++ based; do you know C++? LucidImagination provides a convenient LucidWorks for Solr distribution that will make deployment for those unfamiliar with Java a snap. Ironically, Solr has better Ruby integration than Sphinx. There's acts_as_solr which plugs into ActiveRecord, and at a pure ruby level there are a couple great options as well but that's not your use case. You may be using rails but no matter what your server side language of choice is, you might want to consider using AJAX-Solr and it's got a fantastic demo. Lastly, Solr is definitely a larger project than Sphinx with more history and information out there to help you including my book. LucidImagination offers a free PDF reference guide too.
Although sphinx has craigslist, Solr has http://www.lucidimagination.com/why-lucid/who-uses-lucene-solr
So I think the answer is quite clear.
I tried both, and they're both great. As far as I am concerned, solr requires java (since it's based on lucene), and sphinx doesn't. That's why I go with sphinx unless I have a very good reason to want solr specifically.
My experience has been for small data, thinking sphinx (or ultra) have been an easy search solution to utilize for a developer just looking to get something running. Once the data is larger than say, one hundred thousand rows in the db, then both plugins expose how tightly coupled they are to active record. One then has to balance the delicate dance between when is the sphinx index executed (in cron, in deploy, etc.), how often indexing is run, is delta indexing used, and how much time indexing takes, among other things. Also, once your data gets complicated about how and what results should be exposed in search, you start to feel like the customizability of sphinx is limiting.
We are in the process of moving search out of a sphinx plugin into something independent of the development and deployment lifecycle of our active record models. We have not decided if we will continue to use sphinx or switch to solr. We just want to get search and indexing decoupled from the model and pulled out into it's own service that our rails application speaks to.
I used both in different projects. I would stay with solr, as it was easier to install: but that is just my experience. You can get more information here.
I'm also trying to compare Solr/Sphinx and found another way they are different in. It's search features:
- strict order operator
- SENTENCE/PARAGRAPH search
If these features are important in context of your development, take a look at this.
精彩评论