If you do not specify an explicit START
clause, Cypher needs to infer where in the graph to start your query.
One way Cypher might find start points is by looking at available indexes, but currently this can only be done automatically
when there is only one index that is applicable to the query.
If there is more than one possible index to use, you must use an index hint to tell cypher which index to use.
![]() | Note |
---|---|
You cannot use index hints if your query has a |
To query using an index hint, use USING
+INDEX.
Query.
MATCH n:Swedish-->() USING INDEX n:Swedish(surname) WHERE n.surname = 'Taylor' RETURN n
The query result is returned as usual.
To query using multiple index hints, use USING
+INDEX.
Query.
MATCH m:German-->n:Swedish USING INDEX m:German(surname) USING INDEX n:Swedish(surname) WHERE m.surname = 'Plantikow' and n.surname = 'Taylor' RETURN m
The query result is returned as usual.
Copyright © 2013 Neo Technology