By default, Neo4j uses Lucene as its index implementation. So anyone planning to use Neo4j indexing feature, should learn the basics of inverted index and Lucene. Below tutorials are a good start
- Inverted Index
- Creating a simple inverted index
- How to implement search engine
- Lucene: Getting started
You have two options of using indexes in Neo4j
- If you enable this, then there will be only two indexes created; 1 for the Nodes and another one for the Relationships.
- Updates to the Nodes or Relationships are automatically handled by the Neo4j
- Tow large indexes for your entire db instance. Some use-case require finer level control.
- Control WHAT you want to index. You can choose to index only few types of your nodes and relationships and also only few properties of those.
- Control WHERE you want to index. You can have separate indexes for each types of nodes/relationships. For e.g. in a movie related db, you can have users indexed in a “users” index and movies indexed in a “movies” index.
- Might result in less space and might be more performant.
- You are responsible for making sure to cascade the insert, delete and modify operations to the index as well.