4
votes

I'm having trouble understanding the difference between the legacy indexing approach and the new indexing approach so perhaps someone could clarify these points for me. My only concern is really how it relates to the Java API and not Cypher queries.

Sub-Questions

1) Is Legacy Indexing the same thing as auto-indexing?

2) Is it true that if you are not using auto-indexing then every time you add a node to the graph you must specify whether or not it should be indexed?

3) Am I correct in believing you can enable/disable auto-indexing all from the Java api without having to mess with the configuration files?

4) What is meant by this line below taken from http://docs.neo4j.org/chunked/milestone/indexing.html

This chapter focuses on how to use the Manual Indexes and Autoindexes. As of Neo4j 2.0, this is not the favored method of indexing data in Neo4j, instead we recommend defining indexes in the database schema.

Note:

I'm using the Java API

1

1 Answers

5
votes
  1. Yes, auto-indexes are a type of legacy index.
  2. Yes.
  3. Yes, you can for embedded. See an example here: Neo4j Embedded Fulltext Automatic Node Index
  4. The new "schema indexes" are the favored way to define indexes, based on labels. Legacy indexes are... the old way to do it. You can use them both together if needed.