Choosing a stand-alone full-text search server: Sphinx or SOLR?

knorv picture knorv · Aug 16, 2009 · Viewed 55.5k times · Source

I'm looking for a stand-alone full-text search server with the following properties:

  • Must operate as a stand-alone server that can serve search requests from multiple clients
  • Must be able to do "bulk indexing" by indexing the result of an SQL query: say "SELECT id, text_to_index FROM documents;"
  • Must be free software and must run on Linux with MySQL as the database
  • Must be fast (rules out MySQL's internal full-text search)

The alternatives I've found that have these properties are:

  • Solr (based on Lucene)
  • ElasticSearch (also based on Lucene)
  • Sphinx

My questions:

  • How do they compare?
  • Have I missed any alternatives?
  • I know that each use case is different, but are there certain cases where I would definitely not want to use a certain package?

Answer

Mauricio Scheffer picture Mauricio Scheffer · Aug 19, 2009

I've been using Solr successfully for almost 2 years now, and have never used Sphinx, so I'm obviously biased. However, I'll try to keep it objective by quoting the docs or other people. I'll also take patches to my answer :-)

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: