Share

Updated: September 16th, 2012

In the past few weeks I've been implementing advanced search at Plaxo, working quite closely with Solr enterprise search server. Today, I saw this relatively detailed comparison between Solr and its main competitor Sphinx (full credit goes to StackOverflow user mausch who had been using Solr for the past 2 years). For those still confused, Solr and Sphinx are similar to MySQL FULLTEXT search, or for those even more confused, think Google (yeah, this is a bit of a stretch, I know).

Similarities

  • Both Solr and Sphinx satisfy all of your requirements. They're fast and designed to index and search large bodies of data efficiently.
  • Both have a long list of high-traffic sites using them (Solr, Sphinx)
  • Both offer commercial support. (Solr, Sphinx)
  • Both offer client API bindings for several platforms/languages (Sphinx, Solr)
  • Both can be distributed to increase speed and capacity (Sphinx, Solr)

Here are some differences

Related questions

Conclusion

In my experience, Solr is very-very fast on the query side. It is also very powerful. The indexing side is very CPU and memory intensive and is an unfortunate side effect of having such a feature-rich, fast application. Nevertheless, I highly recommend Solr.

For disclaimer purposes, I have not had much experience with Sphinx and, again, all credit for this comparison goes to mausch.

By the way, here's a really good resource for Solr 1.4 that just came out: Solr 1.4 Enterprise Search. I have this book and it's quite helpful in explaining such topics as multicore setup, search methods, replication, etc.

● ● ●

Artem Russakovskii is a San Francisco programmer, blogger, and future millionaire (that last part is in the works). Follow Artem on Twitter (@ArtemR) or subscribe to the RSS feed.

In the meantime, if you found this article useful, feel free to buy me a cup of coffee below.



Share
  • http://www.xaprb.com/ Baron

    Artem,

    "if you ever need to embed or extend (not just "use") Sphinx in a commercial application, you'll have to buy a commercial license."

    I think you need to be more careful about the wording here. In fact, I think it is best to stop at "it is GPLv2," because it is very difficult to say anything accurate about the GPL's restrictions in a few words like that. You need to define a commercial application, for example, and you need to define embed, extend, and use.

  • http://bugsquash.blogspot.com Mauricio Scheffer

    Baron, Sphinx's license is *very* clear about its GPL situation and the meaning of "embed", "extend" and "use". See http://www.sphinxsearch.com/licensing.html

  • Marco Lazzeri

    Field collapsing is not complete in Solr (click on the link you linked). That's why I'm switching to Xapian.

    Thanks for the article! Cheers

  • noone

    Unfortunately SOLR does not have a background indexer like Sphinx does which can automatically index in the background a mysql database and you must write more code to do so.

    • Bobby

      I have to disagree with you on that one. It does have the ability to index in the background on its own. There is no scheduler to do it. I personally use Solr with PHP. I have cron jobs that the make the calls to Solr to initiate a full-import or delta-import. You can also directly add/delete/edit solr records, in my case when I update a product the old record is deleted and a new one is instantly added.

  • noone

    I will correct myself by saying that i just noticed the DataImportHandler (http://wiki.apache.org/solr/DataImportHandler)

  • Bo Blangstrup

    Might want to add:

    If you want to deploy the search server on a windows platform then solr is the way to go since sphinx does not support multithreading on windows.

  • drdick

    The author of this article is ill-informed in my opinion. He even admits as much stating '…I have not had much experience with Sphinx.'
    Therefore one who reads this article must ask themselves, why make declaratory statements regarding comparisons between Sphinx and Solar, when you know very little about Sphinx… If you are interested in making an informed decision feel free to reference the Sphinx Feature List:
    http://www.sphinxsearch.com/about/sphinx/ and then compare that to Lucene/Solar.

  • a

    stackoverflow user, mausch, on which this blog post is based stated that he hasn't used sphinx.

  • MagentoEye

    Sphinx is an extremely easy system to get up and running.