Database Reference
In-Depth Information
Using legacy indexes
Legacy indexes are also known as manual indexes that are managed at the application level
via IndexManager API available at http://neo4j.com/docs/2.1.5/javadocs/org/neo4j/
graphdb/index/package-summary.html . Legacy indexes are created by a unique user-
defined name and can be created either on nodes or relationships.
Searching or retrieving the data from legacy indexes is also a manual process and can be
done in two ways:
org.neo4j.graphdb.index.Index.get : This will return the exact
matches for a given key-value pair.
org.neo4j.graphdb.index.Index.query : Exposes querying capabilit-
ies from the backend indexing APIs used for indexing the data. Neo4j leverages
Lucene ( http://lucene.apache.org/ ) and Lucene query syntax can be directly used
for querying the database.
We will discuss in detail the various kinds of searches exposed by legacy indexes in the
next chapter.
We can also use the autoindexing mechanism for enabling legacy indexing by enabling
properties such as node_auto_indexing , node_keys_indexable , relation-
ship_auto_indexing , and relationship_keys_indexable in
neo4j.properties .
Maintaining or querying with legacy or manual indexes is a complicated process.
Everything needs to be managed by the application itself, which is against the principles of
databases where indexes should be automatically populated/updated and used once it is
defined by the users. So, to improve the efficiency and ease of use, Neo4j 2.0 introduced a
new mechanism for indexing and deprecated the old process of manual indexing, though it
is still supported but only for backward compatibility for Neo4j applications which are de-
veloped and running on earlier versions of Neo4j (=<Neo4j1.9.9).
Search WWH ::




Custom Search