Skip to content

Instantly share code, notes, and snippets.

@divideby0
Last active April 8, 2016 22:04
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save divideby0/4661393 to your computer and use it in GitHub Desktop.
Save divideby0/4661393 to your computer and use it in GitHub Desktop.
Solr vs Elasticsearch

Note: This article was greatly influenced by a much more comprehensive overview published by Sematext.

In my opinion, Solr is more mature but Elasticsearch has a few bleeding-edge features which might be worth the transition depending on what you're trying to do.

Elasticsearch is more schemaless than Solr. It also supports nested documents, multi-fields storing multiple types in the same index, and cross-index searching.

From a management standpoint, the latest versions of Solr (4.x) use Zookeeper ensembles for clustering whereas Elasticsearch has a somewhat magical zen discovery mode where most clustering and sharding concerns can be handled automatically with little or no configuration at all.

Elasticsearch is considered more RESTful in its API structure, as it makes full use of the HTTP verbs to interact with the index. Most management commands can also be structured as RESTful calls, whereas many changes to Solr require an XML file change.

In terms of relevance scoring and calculated fields, Elasticsearch has some advatanges in my opinion as well. It supports scripted sorting in a variety of languages (Java, MVEL, Groovy, JavaScript, Python, etc.). It also allows you to create scripted fields and filters through similar mechanisms.

Some miscellaneous other features include: explicit interval range faceting and a pretty sweet high-availability data import pipeline, the river.

Some pieces I generally miss from Solr are:

  • No result grouping/field collapsing (Issue #256)
  • No 'did you mean' spell checker (Issue #911)
  • Fewer native languages and stemmers supported out the box (though there are some plugins available)
  • No built-in support for non-JSON formats like XML or CSV (could be a feature depending on who you ask)

Shameless plug: Spantree does Solr and Elasticsearch consulting. Feel free to reach out via email or phone at 773-359-3865.

@bigtech
Copy link

bigtech commented Feb 20, 2014

This may seem small, but ElasticSearch has built-in upsert, which is what caused me to switch away from SOLR for a project I maintain.

http://stackoverflow.com/questions/14886814/can-solr-perform-an-upsert

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment