solr vs elastic search

[ELASTIC] Solr vs Elasticsearch: Open source search platforms compared

Rate this article

Share this article

Solr and Elastic search are both search engines that are widely used.  Here is a detailed comparison of the total cost of ownership, features, and performance of both these two search engines.

[lwptoc itemsFontSize=”150%”]

Create your site search engine

solr vs elasticsearch 2019

SOLR vs Elasticsearch these are the points that will be discussed in this article.

  1. Open source or not.
  2. Popularity.
  3. Feature smackdown.
  4. Age.
  5. Commits on Github.
  6. Installation.
  7. Implementation cost.
  8. Machine learning capabilities.
  9. Performance
  10. Indexing.

Solr and Elastic search are basically sisters to be honest – both are pretty similar, with Solr being the older one.  They are layers built on top of the core search library Lucene.

solr vs elasticsearch sisters

Lucene – their father.

Lucene is the actual heavy weight lifter in both these engines.  If Lucene cannot do it, both Solr and Elastic cannot do it.  It is actually funny(like many things in life) that Lucene is less famous than Solr and Elastic.  Based on Google trends, Lucene is only 1/4th as popular as these engines that wrap them.  If you got to do any serious search ranking with both Solr or Elastic, you would definitely need to know about Lucene.  Lucene was written by Doug Cutting, who is more famous for his Map-Reduce implementation Hadoop.  Hats off Doug.

Solr vs elastic search- which is a better fit for you and why?

The gravity of this decision:

Is it an important decision in the first place?  Can I easily slide between them later?  It is an important decision and it is not easy to replace one with another.  As you will shortly see, it is not that one is superior to the other, each of them has proven to be better at a particular problem than the other.  Hence understanding your specific need is more important to make the right choice.  Since it is a choice you make mostly once, I would recommend you spend quality time analyzing your use case.

A quick rule of thumb 1:

Do you care more about ease of setup or the capability to tweak the relevance?  If you are for ease of setup, go with Elastic Search.  It is much faster to set up and it would give you a decent start.

If you are an advanced player who would want to be in full control of the search ranking (or relevance), then you have to pick up Solr.  Not that it will give any better results than Elastic Search out of the box, but it would give you more control to create what you are looking for when it comes to ranking.

A quick rule of thumb 2:

Are you looking to search for logs, tweats, etc to just identify an issue, text, then Elastic Search is the right bet.  You would anyway not be able to do any fancy ranking.  Stick with Elastic as it would give you easier setup and maintenance.

If you want to search for eCommerce products, documents like pdf, websites, etc, or any other search like music, that is client-facing, you are better off picking up Solr.  You will spend some time setting it up, but you will not be later stuck with a search you cannot improve to full potential.

Now let’s get down the other dirty details:

Truly Open Source? SOLR vs elastic search:

Solr and Lucene are both Apache projects and are released under the Apache license.  i.e. you can use Lucene/Solr in both commercial and Open Source programs.  Elastic, on the other hand, is owned by a company Elastic.co and is under proprietary Elastic License.

Clearly,  Solr is the winner.  It gives you complete peace of mind, that you have invested your time and energy in tech that no one company can restrict your use or tomorrow be sold to another large DB company.

Winner-SOLR

Which is more popular? Solr vs Elastic searchsolr vs elasticsearch popularity

As you can see around May 2014, Elastic search search volume has overtaken Solr and Solr search volume has been dipping.

Winner- Elastic search.

Who has more features? Solr Vs elastic search

Apache Solr-

Did you know that Duckduckgo runs on Solr?

Apache Solr extensive features such as

  1. Full-text search (phrases, wildcard, joins, grouping, etc)
  2. Real-time indexing
  3. Monitoring metric data
  4. Dynamic clustering.
  5. Faceted search and more (full list here)

Elastic search also has many enterprise features

  1. Full list here.

Winner-Elasticsearch

Who is around for longer?  Solr vs elastic search

Solr has been there since 2004. Elastic Search has been around the block since 2010.  Hence Solr has a lot more legacy features like rich support for XML.

Winner-Solr

Solr vs Elastic search – Commits and contributors on Github

Solr- https://github.com/apache/lucene-solr 31406 commits, 102 contributors. solr vs elasticsearch commits

Elastic search- https://github.com/elastic/elasticsearch 444592 commits, 1152 contributors.solr vs elasticsearch commits

Both are very active.

Winner-Elasticsearch

 

Which is easier to install – Solr vs Elasticsearch?

Both are easy to install.  A newbie would find elastic search easier to install. In terms of developer experience, overall manageability and troubleshooting, Elastic search is a clear winner.

Winner- Elastic search.

How much does it cost to implement- Solr vs Elasticsearch?

Here is a look at the median salary of Solr software engineer from payscale.com which stands at 91,905 USD per year.solr vs elasticsearch costs

Here is the median salary of an Elastic search developer which is around 75,000 USD per year.solr vs elasticsearch costs

That is probably because of the use case also.  Since Solr users tend to spend more time on ranking, you need more mathematical mind.  Which might be one reason for higher cost.

Winner-Elasticsearch

Machine learning capabilities Solr vs elastic search

Solr has free machine learning modules – https://lucene.apache.org/solr/guide/7_5/machine-learning.html

solr vs elasticsearch machine learning

In Elastic search, Machine learning comes as a separate module for which you will have to paysolr vs elasticsearch machine learning

Elastic search will ask you to upgrade throughout their site. Here is a screenshot of their paid machine learning suite.solr vs elasticsearch machine learning

Winner- Solr

Performance: Solr vs elastic search

Solr and Elastic search both are really fast. Both have similar indexing performance. Whereas SOLR has a higher QPS (Query per second)

The following test was done –

  • Two machines (96 GB RAM each)
  • One machine with SOLR and other with elastic search
  • Each instance with 24 GB Java Virtual Memory  heap
  • Four shards (an index is usually split into multiple shards that are distributed across multiple nodes for better fault tolerance)
  • No replicas

40M small documents-

  • Elastic search indexed in 30 minutes (index size 8.8GB)
  • SOLR indexed in 43 minutes (index size 7.6GB)
  • solr vs elasticsearch performance

40 M large documents

  • Elastic search indexed in 179 minutes (index size 363 GB)
  • SOLR indexed in 119 minutes (index size 226 GB)solr vs elasticsearch performance solr vs elasticsearch performance SOLR seems to be slightly faster and could handle a higher number of queries per second.

Winner- SOLR.

Conclusion

Elastic search and SOLR both are pretty similar in almost all areas. If you are looking for complete freedom in your search engine development, you could take up SOLR- you will not be disappointed. Elastic search is a better choice if you are willing to shell out some money.  Also if your use case is for only logs, Elastic search has carved its niche in that segment.

Add an Advanced Search Engine to your website at 9 USD per month

Are you showing the right products, to the right shoppers, at the right time? Contact us to know more.
You may also like