Search-performance indexes enable quicker retrieval of exact matches between an index and the primary data storage. There are four different search-performance indexes available in Neo4j:
Range indexes: Neo4j’s default index. Supports most types of predicates.
Text indexes: solves predicates operating on
STRINGvalues. Optimized for queries filtering with the
Point indexes: solves predicates on spatial
POINTvalues. Optimized for queries filtering on distance or within bounding boxes.
Token lookup indexes: only solves node label and relationship type predicates (i.e. they cannot solve any predicates filtering on properties). Two token lookup indexes (one for node labels and one for relationship types) are present when a database is created in Neo4j.
To learn more about creating, listing, and deleting these indexes, as well as more details about the predicates supported by each index type, see Create, show, and delete indexes.
For information about how indexes impact the performance of Cypher® queries, as well as some heuristics for when to use (and not to use) a search-performance index, see The impact of indexes on query performance.
Search-performance indexes are used automatically, and if several indexes are available, the Cypher planner will try to use the index (or indexes) that can most efficiently solve a particular predicate.
It is, however, possible to explicitly force a query to use a particular index with the
USING keyword. For more information, see Index hints for the Cypher planner.