After the launch of our Solr module for Magento, we got asked why we are using Solr as a base technology instead of its contender ElasticSearch.
Some background information: both Solr and ElasticSearch are OpenSource projects, based on Apache Lucene. While Solr was first released in 2004, ElasticSearch was published in 2010. Though, both projects are stable and strong contenders on the market of enterprise search engines.
Performance, Stability, Scalability
Comparing both systems objectively, it’s hard to find big differences. Both are about equal in performance (means: both are very fast), both are stable and mature systems. Solr is said to be a little bit more robust, while the scalability of ElasticSearch is a bit better. In practice, there is no big difference between Solr and ElasticSearch. They differ in details – but none of them are too important for almost any Magento shop.
Although both system are OpenSource, the spirit is different: Solr is developed by distributed developers all over the world, not only by the Apache Software Foundation which is the official developer. This can make decisions and changes in strategy more difficult, but it also reduces the dependency on a specific company. On the other hand, while there is a (smaller) community around ElasticSearch as well, only employees of Elasticsearch can actually make changes to Elasticsearch, which means that the further development of ElasticSearch is dependant on a single company.
As the Solr community is bigger and older than the ElasticSearch community, this also means that more eyes look over every line of code of the Solr project. Of course, this improves stability and security, while the development of ElasticSearch is more flexible and can move faster.
It’s easier to make your first steps with ElasticSearch: it’s more intuitive, and it runs out of the box, while you need to do some configuration and especially familiarization when using Solr for the first time. That’s a fact, but that’s not your problem: you don’t need any Solr knowledge if you are using our IntegerNet_Solr module – we are including the full configuration files into the module.
We had to overcome a few hurdles when we started with Solr in previous projects. On the other hand, this is an advantage: having overcome those hurdles means that we know the background and structure of Solr much better and can optimize our module (of course, taking part in a professional Solr training as we did helped as well).
That’s also the main reason why we chose Solr: we had gathered experience with Solr before. We used existing Solr modules for Magento in a few projects. This means that we even extended those modules and improved the according functionality, so we needed to dig into Solr as well. For example, the KKL Luzern project required us to adjust an existing Solr module to filter events by date (ranges).
From a technical point of view, both Solr and Elasticsearch are equally well suited to be used in profesional search modules, with no big advantages for either side. If you are interested in further details, have a look at the excellent article “Solr or Elasticsearch–That Is the Question” by Otis Gospodnetić .
There is one important difference though: Solr is even “more” OpenSource than ElasticSearch.
In the end, this means that we were able to choose the technology which we were much more familiar with as a base – Solr.
Author: Andreas von Studnitz
Andreas von Studnitz is a Magento developer and one of the Managing Directors at integer_net. His main areas of interest are backend development, Magento consulting and giving developer trainings. He is a Magento 2 Certified Developer Plus and a Magento (1 and 2) Certified Solution Specialist. He was appointed a Magento Master in 2019.