Apache Solr vs ElasticSearch - the Feature Smackdown!
API
Feature | Solr 4.7.0 | ElasticSearch 1.0 |
---|---|---|
Format | XML,CSV,JSON | JSON |
HTTP REST API | ![]() |
![]() |
Binary API ![]() |
![]() |
![]() |
JMX support | ![]() |
![]() |
Client libraries ![]() |
PHP, Ruby, Perl, Scala, Python, .NET, Javascript | PHP, Ruby, Perl, Scala, Python, .NET, Javascript, Erlang, Clojure |
3rd-party product integration (open-source)![]() |
Drupal, Magento, Django, ColdFusion, Wordpress, OpenCMS, Plone, Typo3, ez Publish, Symfony2, Riak (via Yokozuna) | Drupal, Django, Symfony2, Wordpress, CouchBase |
3rd-party product integration (commercial)![]() |
DataStax Enterprise Search, Cloudera Search, Hortonworks Data Platform, MapR | SearchBlox, Hortonworks Data Platform, MapR |
Output![]() |
JSON, XML, PHP, Python, Ruby, CSV, Velocity, XSLT, native Java | JSON, XML/HTML (via plugin) |
Indexing
Searching
Feature | Solr 4.7.0 | ElasticSearch 1.0 |
---|---|---|
Lucene Query parsing ![]() |
![]() |
![]() |
Structured Query DSL ![]() |
![]() |
![]() |
Span queries ![]() |
![]() |
![]() |
Spatial search ![]() |
![]() |
![]() |
Multi-point spatial search ![]() |
![]() |
![]() |
Faceting ![]() |
![]() |
![]() |
Advanced Faceting ![]() |
![]() |
![]() |
Pivot Facets ![]() |
![]() |
![]() |
More Like This | ![]() |
![]() |
Boosting by functions ![]() |
![]() |
![]() |
Boosting using scripting languages ![]() |
![]() |
![]() |
Push Queries ![]() |
![]() |
![]() |
Field collapsing/Results grouping ![]() |
![]() |
![]() |
Spellcheck | ![]() |
![]() |
Autocomplete | ![]() |
![]() |
Query elevation ![]() |
![]() |
![]() |
Joins ![]() |
![]() |
![]() |
Resultset Scrolling ![]() |
![]() |
![]() |
Filter queries ![]() |
![]() |
![]() |
Filter execution order ![]() |
![]() |
![]() |
Alternative QueryParsers ![]() |
![]() |
![]() |
Negative boosting ![]() |
![]() |
![]() |
Search across multiple indexes | ![]() |
![]() |
Result highlighting | ![]() |
![]() |
Custom Similarity ![]() |
![]() |
![]() |
Searcher warming on index reload ![]() |
![]() |
![]() |
Customizability
Distributed
Feature | Solr 4.7.0 | ElasticSearch 1.0 |
---|---|---|
Self-contained cluster ![]() |
![]() |
![]() |
Automatic node discovery | ![]() |
![]() |
Partition tolerance | ![]() |
![]() |
Automatic failover | ![]() |
![]() |
Automatic leader election | ![]() |
![]() |
Shard replication | ![]() |
![]() |
Sharding ![]() |
![]() |
![]() |
Automatic shard rebalancing![]() |
![]() |
![]() |
Change # of shards | ![]() |
![]() |
Relocate shards and replicas ![]() |
![]() |
![]() |
Control shard routing ![]() |
![]() |
![]() |
Consistency | Indexing requests are synchronous with replication. A indexing request won't return until all replicas respond. No check for downed replicas. They will catch up when they recover. When new replicas are added, they won't start accepting and responding to requests until they are finished replicating the index. | Replication between nodes is synchronous by default, thus ES is consistent by default, but it can be set to asynchronous on a per document indexing basis. Index writes can be configured to fail is there are not sufficient active shard replicas. The default is quorum, but all or one are also available. |
Misc
Feature | Solr 4.7.0 | ElasticSearch 1.0 |
---|---|---|
Web Admin interface | ![]() |
![]() |
Hosting providers | WebSolr, Searchify, Hosted-Solr, IndexDepot, OpenSolr,gotosolr | bonsai.io, Indexisto, qbox.io, IndexDepot |
Thoughts...
As a number of folks point out in the discussion below, feature comparisons are inherently shallow and only go so far. I think they serve a purpose, but shouldn't be taken to be the last word on these 2 fantastic search products.
If you're running a smallish site and need search features without fancy bells-and-whistles, I think you'll be very happy with either Solr or ElasticSearch.
I've found ElasticSearch to be friendlier to teams which are used to REST APIs, JSON etc and don't have a Java background. If you're planning a large installation that requires running distributed search instances, I suspect you're also going to be happier with ElasticSearch.
As Matt Weber points out below, ElasticSearch was built to be distributed from the ground up, not tacked on as an 'afterthought' like it was with Solr. This is totally evident when examining the design and architecture of the 2 products, and also when browsing the source code.
Resources
- My other sites may be of interest if you're new to Lucene, Solr and ElasticSearch:
- The Solr wiki and the ElasticSearch Guide are your friends.