Elasticsearch Pros and Cons | Advantages and Disadvantages of Elasticsearch

Advantages(Pros) of Elasticsearch:

BUILT ON TOP OF LUCENE – Being built on top of Lucene, it offers the most powerful full-text search capabilities.

FULL-TEXT SEARCH – Elasticsearch performs linguistic searches against documents and returns the documents that match the search condition. Result relevancy for the given query is calculated using TF/IDF algorithm.

DOCUMENT-ORIENTED – It stores complex entities as structured JSON documents and indexes all fields by default, providing a higher performance.

SCHEMA FREE – It stores a large quantity of semi-structured (JSON) data in a distributed fashion. It also attempts to detect the data structure, index the data present and makes it search-friendly.

RESTFUL API – Elasticsearch supports REST API which is light-weight protocol. We can query Elasticsearch using the REST API with Chrome plug-in Sense. Sense provides a simple user interface. Since plugin has features like autocomplete Elasticsearch query syntax, copying the query as cURL command.

Disadvantages of Elasticsearch:

  • Elasticsearch does not have multi-language support in terms of handling request and response data (only possible in JSON) unlike in Apache Solr, where it is possible in CSV, XML and JSON formats.
  • Elasticsearch also has a problem of Split brain situations but in rare cases.
  • It is not as good at being a data store as some other options like MongoDB, Hadoop, etc. For smaller use cases, it will perform fine. If you are streaming TB’s of data every day, you will find that it either chokes or loses data.
  • When you or your team are not that fluent at using the tool. Especially in the enterprise search use case, it is not as easy out of the box as, say, solutions from Algolia. To be sure, Elasticsearch is way more powerful and flexible, but it’s learning curve is much steeper.
  • When you can’t or won’t create a production-worthy setup because of economics. For test and dev, a single node will work fine. When you move to production, you should have no less than a 3-node/2-replica.