I'm quite new to NoSql databases, but I'm really lovin' MongoDB with the official c# driver. It's currently the backend to an MVC application I'm writing, and the simplicity AND speed make my life way way easier.
However I've come to that point in the application where I need really great search. I used to use Solr, but have become quite interested in ElasticSearch.
ElasticSearch, as far as I can tell (from a very superficial level), can do everything MongoDB can in terms of being a document database.
So, if I'm already using a NoSql db, and I need great search, is there any point in Mongo? What's the use case?
Is Mongo faster? Easier to use? Is it the BSON datatypes and drivers? Why not use ElasticSearch as my DB?
I'm currently using AppHarbor and lovin' "The Cloud". I hate IT and want to focus on my application only. With that said, the only advantage I see so far is:
MongoDB NoSQL databases and relational databases differ in many ways. Not only is MongoDB easy-to-use, but it also supports excellent scaling options. Moreover, the performance capabilities of MongoDB are unbeatable compared to other databases.
Elasticsearch takes first place in search engine and seventh place overall. MongoDB has the first rank in document store databases and fifth overall.
Elasticsearch is built for search and provides advanced data indexing capabilities. For data analysis, it operates alongside Kibana, and Logstash to form the ELK stack. MongoDB is an open-source NoSQL database management program, which can be used to manage large amounts of data in a distributed architecture.
MongoDB is designed to make data easy to access, and rarely to require joins or transactions, but when you need to do complex querying, it's more than up to the task. The MongoDB Query API allows you to query deep into documents, and even perform complex analytics pipelines with just a few lines of declarative code.
MongoDB is better than other SQL databases because it allows a highly flexible and scalable document structure. For example: One data document in MongoDB can have five columns and the other one in the same collection can have ten columns.
This is a very good question. I have asked myself the same question and came up with the following answer.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With