What advantages does MongoDB offer over ElasticSearch as a NoSQL database only What advantages does MongoDB offer over ElasticSearch as a NoSQL database only elasticsearch elasticsearch

What advantages does MongoDB offer over ElasticSearch as a NoSQL database only


This is a very good question. I have asked myself the same question and came up with the following answer.

  1. ElasticSearch doesn’t have a good way to backup data. As an example, do a quick search for “ElasticSearch backup” and one for “mongodb backup”. MongoDB has tools and documentation on how to backup data. While there is documentation on how to backup ElasticSearch data, this documentation doesn’t seem as mature.
  2. In general, MongoDB has much better documentation. In particular its admin documentation is much better than ElasticSearch.
  3. MongoDB provides commercial support. You might not care about commercial support at the moment, but it is nice to know it is available.
  4. MongoDB has MapReduce built in, ElasticSearch does not. This may not be a big thing, but worth noting.

My personal opinion is that I wouldn’t use ElasticSearch if you cannot afford to lose data. I could see using ElasticSearch as a primary data store for something requiring real-time analytics, but did not have any long-term data retention requirements. Otherwise, I would suggest using MongoDB and ElasticSearch together. There is a MongoDB River Plugin for ElasticSearch. This makes it pretty easy to update the ElasticSearch index automatically.