I don't find any deep explanation on the web about a comparison between ElasticSearch and the graph databases.
Both are optimized to traverse data.
ElasticSearch seems to be optimized for analytics.
However Neo4j is also based on Lucene to manage indexes and some fulltext features.
Why would I use ElasticSearch if I already use a graph database ?
In my case, I'm using Neo4j to build a social network.
What real benefit may ElasticSearch bring?
I've just found this paragraph:
There are myriad cases in which elasticsearch is useful. Some use cases more clearly call for it than others. Listed below are some tasks which for which elasticsearch is particularly well suited.
- Searching a large number of product descriptions for the best match for a specific phrase (say “chef’s knife”) and returning the best results
- Given the previous example, breaking down the various departments where “chef’s knife” appears (see Faceting later in this book)
- Searching text for words that sound like “season”
- Auto-completing a search box based on partially typed words based on previously issued searches while accounting for mis-spellings
- Storing a large quantity of semi-structured (JSON) data in a distributed fashion, with a specified level of redundancy across a cluster of machines
It should be noted, however, that while elasticsearch is great at solving the aforementioned problems, it’s not the best choice for others. It’s especially bad at solving problems for which relational databases are optimized. Problems such as those listed below.
- Calculating how many items are left in the inventory
- Figuring out the sum of all line-items on all the invoices sent out in a given month
- Executing two operations transactionally with rollback support
- Creating records that are guaranteed to be unique across multiple given terms, for instance a phone number and extension
- Elasticsearch is generally fantastic at providing approximate answers from data, such as scoring the results by quality. While elasticsearch can perform exact matching and statistical calculations, its primary task of search is an inherently approximate task.
- Finding approximate answers is a property that separates elasticsearch from more traditional databases. That being said, traditional relational databases excel at precision and data integrity, for which elasticsearch and Lucene have few provisions.
Can I assert that if I don't need approximate answers, then ElasticSearch would be useless compared to an already used graph database?