4

Both Neo4j 4.0 and elasticsearch have full text seach and inverted index with apache lucene. So how elastic search is better than neo4j full text search?
Consider that we are dealing with the knowledge graph as a data storage model developed in Neo4j. Apart from that why should we use elasticsearch with Neo4j 4.0. what are things that elasticsearch offer but not neo4j 4.0

1 Answers1

2

So how elastic search is better than neo4j full text search?

"Better" is largely dependent on your use case. But the tools (Neo4j and ElasticSearch) were built for drastically different purposes.

Neo4j is best when used as a graph-traversal engine, returning data from edge (relationship) based queries. It might have similar capabilities, but it just wasn't meant to be used as a search engine.

Want things like "fuzzy" matching and relevance ranking? Neo4j is not going to do any of that. Also, ElasticSearch is a true out-of-the-box distributed datastore. Neo4j can't distribute without an enterprise license.

Basically, it comes down to business requirements. If a datastore mainly needs to execute graph traversals, and serve some simple search-like requests, Neo4j might be enough on its own. Need a full-featured search engine to serve that same data? ElasticSearch is the better suited to handle that.

Aaron
  • 55,518
  • 11
  • 116
  • 132
  • 1
    "Want things like 'fuzzy' matching and relevance ranking? Neo4j is not going to do any of that" -- Is this true? My understanding is that Neo4j supports Lucene, which is the exact same search engine that ElasticSearch uses https://neo4j.com/developer/kb/fulltext-search-in-neo4j/ – user196499 Jul 25 '21 at 02:20