Hacker News new | ask | show | jobs
by burnmaster 2850 days ago
I see several responses that mention MongoDB for purposes of comparison and seem to conclude Elasticsearch fares favorably.

It should be noted:

[1] Unlike MongoDB (which is a ground-up build), Elasticsearch is basically an API layer on top of Apache Lucene. This is relevant because they haven't built and don't maintain, control, or own the source of their primary IP.

[2] Unlike MongoDB (General Purpose) Elasticsearch is a single purpose database and good at/used for one thing and one thing only. It searches text fields for text.

So its potential use cases and thus marketshare is far more limited.

[3] Posts on stackoverflow with the tag:

elasticsearch × 34,253 mongodb x 103,478

7 comments

Elasticsearch is much more than a search engine.

Lots of people use it for analytics (checkout their aggregation/time series queries) as well as analyzing huge logs. Some people are starting to use it for machine learning use cases too.

I have seen it used almost exclusively for logging as part of the Elastic (formerly ELK) stack.
At my previous job we used it for a fair amount of analytics for our SaaS clients.
Even the "plain" ELK uses aggregations to produce those graphs.
Anyone that's tried to build anything non-trivial using ElasticSearch's aggregation API and MongoDB's aggregation API will just laugh at the idea of using MongoDB over ES. The ElasticSearch APIs are just so much nicer to use than MongoDB APIs.

MongoDB aggregation feels like writing code in assembler.

No one owns Lucene. If everyone stopped developing Lucene, Elastic could devote resources to it which they already do. I don't think that is a potential risk at all.
Lucene is open source, Mongo is open source. It's the same approach.

Elastic is used for search, log analysis and analytics.

Apache license vs AGPL is not the same approach.

MongoDB owns their code - Elastic does not own Lucene.

As a long time Elastic user:

[1] You don't understand their IP if you think it's Lucene. It really, really isn't.

[2] It's not single purpose anything. I've used it for search engines, event buses and as document stores. It's multi-purpose and more dependable at scale and under duress than Mongo thanks to sitting on top of the JVM.

[3] Stackoverflow stats don't mean anything. What are you trying to imply?

At this point Elastic is a lot more than a wrapper around Lucene/Solr as they have acquired many companies to build out their product offerings. That isn't necessarily a good thing, in my opinion they need to trim down their product from a hodgepodge of APIs to something that can be more easily put to use. The amount of work involved with getting something useful out is about the same that it would take to build a custom solution off Lucene/Solr.
I think calling it just an API later over Lucene is a bit dismissive. I’ve worked with search products built directly on Lucene vs ElasticSearch and there’s significant value add even without the API. In particular, sharding, replicating and managing indexes is trickier than you’d expect and took up a lot of dev time. ElasticSearch made that work go poof.