Search Engines: Comparing Solr, Elasticsearch and OpenSearch

In today’s web applications, search functions are omnipresent. Searching for product titles or within a product description is a necessity for e-commerce, but the search isn’t limited to web applications. Different use cases lead to different requirements. Luckily, the open-source world provides a number of modern search engines to fit these requirements.

But which search engine is the right fit for your use case? This article outlines three possible options, two of which are available as a Managed Service at Nine: Apache Solr, Elasticsearch (which is not available as a Managed Service at Nine), and OpenSearch. 

Based on Apache Lucene

The three search engines have one thing in common. They are all based on the same powerful Java library: Apache Lucene. Apache Solr and Apache Lucene are both published by the Apache Foundation as open-source projects.

As they are based on Apache Lucene, all three search engines provide basic common search features, such as:

  • Ranked searching: search results with the highest relevance are shown first
  • Query types: phrase queries, wildcard queries, proximity queries, etc.
  • Sorting: search results can be sorted via fields
  • Features: highlighting, faceting (dynamic filtering), etc.

However, the search engines differ when it comes to complex features. 

Search Engine Popularity

Currently, Elasticsearch is the most popular search engine among the three options.


Elasticsearch Licensing Change

First, let’s address the elephant in the room when it comes to Elasticsearch: its licensing change. Starting from version 7.10.2, the Elasticsearch licencing model was changed from the open-source licence ‘Apache 2.0’ to a ‘Server Side Public Licence (SSPL)’. Although the code is still available for download, the new licence is not compatible with the ideas of the Open Source Initiative (OSI). One major change is that Elasticsearch can no longer be provided to others as a Managed Service. Moving forward, this licence change effectively prevents us from providing newer versions of Elasticsearch as a Managed Service.

This licensing change prompted the creation of OpenSearch on 12 April 2021. It was forked from Elasticsearch 7.10.2 by Amazon. Some code was removed, meaning that it remained compatible with the Apache 2.0 licence. As we were unable to provide Elasticsearch as a Managed Service after the licensing change, we introduced OpenSearch as a replacement for Elasticsearch.

Choosing the Right Search Engine

All three search engines offer a wide variety of features and are suited to most use cases. If you are experienced with one of the search engines, we recommend you to go with that one. It is generally accepted that the differences between these search engines are so small that prior experience is a valid reason for choosing one over another.

Please bear in mind that, due to the aforementioned licence restrictions, Nine is offering OpenSearch and Solr, and cannot provide Elasticsearch as a Managed Service.

We nevertheless include Elasticsearch in our list of key differences between the three search engines in the next chapters.

Differences Between Apache Solr and Elasticsearch

Differences in Features

When it comes to the features, the key differences are as follows:

  1. Main Focus: Solr’s primary strength lies in its robust full-text search capabilities, offering a wider range of features in this area compared to Elasticsearch. While Elasticsearch simplifies its interface through a straightforward API, it sacrifices some flexibility in the process. Meanwhile, Elasticsearch excels at handling time series data and analytics, and is renowned for its exceptional scalability, processing time series data, and analytics.
  2. Data Handling: Both provide a variety of options and data sources, such as JSON or CSV. However, Solr works with predefined schemas, whereas Elasticsearch is more flexible, due to its schema-free approach. Although Solr’s schemas can also be defined to be more dynamic, it cannot match Elasticsearch in that regard.
  3. Query Language: Solr’s query language is more sophisticated and allows for more complex searches. In contrast, Elasticsearch provides a simpler and more intuitive syntax.
  4. Scalability: Although both systems are highly scalable, Elasticsearch has a distributed architecture and supports automatic sharding. 

Differences in Community

Apache Solr has a longer development history, and this comes with a more mature open-source community. However, Elasticsearch benefits from a vibrant and active Elastic community. As of May 2024, according to DB-Engines, Elasticsearch is generally more popular than Apache Solr.

Differences between Elasticsearch and OpenSearch

Differences in Features

Although OpenSearch was forked from Elasticsearch in Version 7.10.2, some differences have emerged in the meantime.

Their common functionality is coming from Apache Lucene, which both are based on. Some specific functionality, such as authentication or authorisation, index management and alerting, are proprietary in Elasticsearch, and thus had to be implemented with open-source alternatives in OpenSearch.

Since the two search engines are developed independently, some new features are mutually exclusive. For example, Elasticsearch has added ‘Time Series Data Streams’ (TSDS), which allow for time stamped metrics data as one or more time series. Meanwhile, OpenSearch reintroduced segment replication, which enables copying segment files across shards, instead of documents being indexed on each shard copy.

Differences in Community

Currently, there seem to be more contributions to Elasticsearch than to OpenSearch. However, interest in OpenSearch keeps rising, while the interest in Elasticsearch is slowly declining. Due to Elasticsearch’s licensing change, there are many providers who no longer offer Elasticsearch as a Managed Service.

Nine Managed Search with OpenSearch and Solr

Elasticsearch/OpenSearch and Solr are among the most popular and powerful open source search servers. The projects are based on Apache Lucene, a programme library which indexes information in a flexible manner and can provide results for even complex searches in a short time.

With OpenSearch and Solr, we are happy to add two new products from the realm of search servers to our managed services portfolio. OpenSearch replaces Elasticsearch, which we can unfortunately no longer offer as a managed service due to changing licence stipulations.

Nine Managed OpenSearch as a Response to New Licence Stipulations

The OpenSearch project was launched as a response to Elasticsearch changing their licence policy. The open-source search engine is supported by organisations such as AWS, RedHat and SAP.

To be able to continue offering powerful search and analytics results as a managed service to our customers, and after a thorough assessment, we have added OpenSearch to our portfolio.

More Features

Just like Elasticsearch, OpenSearch covers a wide range of use cases, such as application monitoring in real time, protocol analysis and website searches. However, it is characterised by a larger set of features. Notable additions are, for example:

  • Extended security: OpenSearch offers functionalities for audits, encryption, authentication and authorisation. This includes integrations with Kerberos, Active Directory, SAML, LDAP, JSON web tokens and other systems. In addition, OpenSearch provides granular, role-based access control for fields, documents and indices.
  • Search support in SQL: Use the SQL query syntax with aggregate functions, such as ‘group by’ and ‘where’, to analyse your data.
  • Anomaly detection: Automatic detection of anomalies based on the random cut forest method (RCF). Combine this with alerting to monitor data and send alerts in near real time.

Compatibility with Elasticsearch and Migration to OpenSearch

OpenSearch is a fork of Elasticsearch version 7.10. Therefore, both services are currently largely compatible, and OpenSearch is aiming to retain this compatibility in future.

Our development focus has been on OpenSearch version 2. You can find links with details regarding compatibility and migration paths at the end of this article.

Nine Managed Solr: The Powerful Search Server for Your CMS

Solr is the ideal addition to your CMS to quickly and neatly display search results for all types of digital information. Since our customer’s needs depend on their use case, the type and scope of their data, as well as the way search results are displayed, we have also added Solr to our portfolio. 

For any other information please contact us.

Talk to one of our experts

Do you have any questions about our products? Either contact Sales or go directly to your cockpit to see all the possibilities at Nine.