0

According to the neo4j documentation, indexing can be done i 2 ways"

Indexing in Neo4j can be done in two different ways: 1. The database itself is a natural index consisting of its relationships of different types between nodes. For example a tree structure can be layered on top of the data and used for index lookups performed by a traverser. 2. Separate index engines can be used, with Apache Lucene being the default backend included with Neo4j.

But there is no comparison which is better in what and what is better in which cases.

Which one is better and why?

1
  • as far as i understand the documentation, the "natural index" means that all relationship types are stored in different locations -thus, when you use in your query some relationship of type KNOWS, the db engine looks only into the KNOWS location and picks up all the rels in it (kindly the natural index itself by default). second is a typical user defined index (i use these for relationship parameters, not types). which one is better? well, the first is faster to pick up but you must afterwards compare all picked relations until your final, which is always slower .
    – ulkas
    Nov 21, 2012 at 9:12

1 Answer 1

0

Is this a data warehouse/mart or reporting database? If you have both transactions and search going against the database it might give interesting pros or cons.

Lucene exists for one reason search and it does it really well. If you have a large system with multiple services, for ultimate scalability it is always to split the services up and keep them doing their single responsibility. This would give you flexibility of using that Lucene index against other services if necessary...also if you ever got rid off neo4j, then you still have your index/search artifacts around not coupled to Neo4j.

I would look at it from the overall system architecture not just specific functionality.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.