Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>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 :-)</p> <p>Similarities:</p> <ul> <li>Both Solr and Sphinx satisfy all of your requirements. They're fast and designed to index and search large bodies of data efficiently.</li> <li>Both have a long list of high-traffic sites using them (<a href="http://wiki.apache.org/solr/PublicServers" rel="noreferrer">Solr</a>, <a href="http://www.sphinxsearch.com/powered.html" rel="noreferrer">Sphinx</a>)</li> <li>Both offer commercial support. (<a href="http://www.lucidimagination.com/" rel="noreferrer">Solr</a>, <a href="http://www.sphinxsearch.com/consulting.html" rel="noreferrer">Sphinx</a>)</li> <li>Both offer client API bindings for several platforms/languages (<a href="http://www.sphinxsearch.com/contribs.html" rel="noreferrer">Sphinx</a>, <a href="http://wiki.apache.org/solr/#head-ab1768efa59b26cbd30f1acd03b633f1d110ed47" rel="noreferrer">Solr</a>)</li> <li>Both can be distributed to increase speed and capacity (<a href="http://www.sphinxsearch.com/docs/current.html#distributed" rel="noreferrer">Sphinx</a>, <a href="http://wiki.apache.org/solr/DistributedSearch" rel="noreferrer">Solr</a>)</li> </ul> <p>Here are some differences:</p> <ul> <li>Solr, being an Apache project, is obviously Apache2-licensed. <a href="http://www.sphinxsearch.com/licensing.html" rel="noreferrer">Sphinx is GPLv2</a>. This means that if you ever need to embed or extend (not just "use") Sphinx in a commercial application, you'll have to buy a commercial license (<a href="http://www.infoworld.com/t/software-licensing/why-do-vendors-select-gpl-license-079" rel="noreferrer">rationale</a>)</li> <li>Solr is <a href="http://wiki.apache.org/solr/Solrj#head-02003c15f194db1a691f8b9bb909145a60ccf498" rel="noreferrer">easily embeddable</a> in Java applications.</li> <li>Solr is built on top of Lucene, which is a proven technology over <a href="http://svn.apache.org/viewvc/lucene/java/tags/LUCENE_1_0_1/" rel="noreferrer">8 years old</a> with a <a href="http://wiki.apache.org/lucene-java/PoweredBy" rel="noreferrer"><em>huge</em> user base</a> (this is only a small part). Whenever Lucene gets a new feature or speedup, Solr gets it too. Many of the devs committing to Solr are also Lucene committers.</li> <li>Sphinx integrates more tightly with RDBMSs, especially MySQL.</li> <li>Solr can be <a href="http://highscalability.com/how-rackspace-now-uses-mapreduce-and-hadoop-query-terabytes-data" rel="noreferrer">integrated with Hadoop to build distributed applications</a></li> <li>Solr can be <a href="https://stackoverflow.com/questions/211411/using-nutch-crawler-with-solr">integrated with Nutch to quickly build a fully-fledged web search engine with crawler</a>.</li> <li>Solr can <a href="http://wiki.apache.org/solr/ExtractingRequestHandler" rel="noreferrer">index proprietary formats like Microsoft Word, PDF, etc</a>. Sphinx <a href="https://stackoverflow.com/questions/1207995/indexing-word-documents-and-pdfs-with-sphinx">can't</a>.</li> <li>Solr comes with a <a href="http://wiki.apache.org/solr/SpellCheckComponent" rel="noreferrer">spell-checker out of the box</a>.</li> <li>Solr comes with <a href="http://wiki.apache.org/solr/SolrFacetingOverview" rel="noreferrer">facet support out of the box</a>. Faceting in Sphinx <a href="http://api-meal.eu/memo/128-faceted-search-with-sphinx-and-php/" rel="noreferrer">takes more work</a>.</li> <li><a href="https://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc/737931#737931">Sphinx doesn't allow partial index updates for field data</a>.</li> <li>In Sphinx, <a href="http://www.sphinxsearch.com/docs/current.html#data-restrictions" rel="noreferrer">all document ids must be unique unsigned non-zero integer numbers</a>. Solr <a href="http://wiki.apache.org/solr/UniqueKey" rel="noreferrer">doesn't even require an unique key for many operations</a>, and unique keys can be either integers or strings.</li> <li>Solr supports <a href="http://wiki.apache.org/solr/FieldCollapsing" rel="noreferrer">field collapsing</a> (currently as an additional patch only) to avoid duplicating similar results. Sphinx doesn't seem to provide any feature like this.</li> <li>While <a href="http://en.wikibooks.org/wiki/Sphinx_Search#SPHINX_DOES_NOT_RETREIVE_DATA.21.21.21" rel="noreferrer">Sphinx is designed to only retrieve document ids</a>, in Solr you can directly get whole documents with pretty much any kind of data, making it more independent of any external data store and it saves the extra roundtrip.</li> <li>Solr, except when used embedded, runs in a <a href="http://en.wikipedia.org/wiki/Web_container" rel="noreferrer">Java web container</a> such as Tomcat or Jetty, which require <a href="http://wiki.apache.org/solr/SolrInstall" rel="noreferrer">additional specific configuration and tuning</a> (or you can use the <a href="http://lucene.apache.org/solr/tutorial.html#Getting+Started" rel="noreferrer">included Jetty</a> and just launch it with <code>java -jar start.jar</code>). Sphinx has no additional configuration.</li> </ul> <p>Related questions:</p> <ul> <li><a href="https://stackoverflow.com/questions/1132284/full-text-searching-with-rails">Full Text Searching with Rails</a></li> <li><a href="https://stackoverflow.com/questions/737275/pros-cons-of-full-text-search-engine-lucene-sphinx-postgresql-full-text-searc">Comparison of full text search engine - Lucene, Sphinx, Postgresql, MySQL?</a></li> </ul>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload