Thursday, February 26, 2015

Search Engines: Comparison between Solr and Sphinx

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

Solr Advantages:
  1.     Solr, being an Apache project, is obviously Apache2-licensed. Sphinx is GPLv2. 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 (rationale)
  2.     Solr is easily embeddable in Java applications.
  3.     Solr is built on top of Lucene, which is a proven technology over 8 years old with a huge user base (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.
  4.      Solr can be integrated with Hadoop to build distributed applications
  5.     Solr can be integrated with Nutch to quickly build a fully-fledged web search engine with crawler.
  6.     Solr can index proprietary formats like Microsoft Word, PDF, etc. Sphinx can’t.
  7.     Solr comes with a spell-checker out of the box.
  8.     Solr comes with facet support out of the box. Faceting in Sphinx takes more work.
  9.     Sphinx doesn’t allow partial index updates for field data.
  10.     In Sphinx, all document ids must be unique unsigned non-zero integer numbers. Solr doesn’t even require an unique key for many operations, and unique keys can be either integers or strings.
  11.     Solr supports field collapsing (currently as an additional patch only) to avoid duplicating similar results. Sphinx doesn’t seem to provide any feature like this.
  12.     While Sphinx is designed to only retrieve document ids, 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.
  13.     Solr, except when used embedded, runs in a Java web container such as Tomcat or Jetty, which require additional specific configuration and tuning (or you can use the included Jetty and just launch it with java -jar start.jar). Sphinx has no additional configuration.
Unless you need to extend the search functionality in any proprietary way, Sphinx is your best bet.

Sphinx Advantages:
  1.     Development and setup is faster
  2.     Much better (and faster) aggregation. This was the killer feature for us.
  3.     Not XML. This is what ultimately ruled out Solr for us. We had to return rather large result sets (think hundreds of results) and then aggregate them ourselves since Solr aggregation was lacking. The amount of time to serialize to and from XML just absolutely killed performance. For small results sets though, it was perfectly fine.
  4.     Best documentation I’ve seen in an open source app
  5.   Sphinx integrates more tightly with RDBMSs, especially MySQL
Source : http://stackoverflow.com/questions/1284083/choosing-a-stand-alone-full-text-search-server-sphinx-or-solr

No comments:

Post a Comment