I'm using neo4j 2.1.4. I have nodes - POINT and relationships - ROAD I have index on ROAD property - OBJ_COD
:schema ls -l :ROAD
Indexes
ON :ROAD(OBJ_COD) ONLINE
ON :ROAD(ID) ONLINE
No constraints
I want to search ROAD by OBJ_COD value, but cypher don'use index to lookup relationship.
neo4j-sh (?)$ profile MATCH (a)-[r:`ROAD` {ID:333275}]-(b:`POINT`) RETURN r LIMIT 1;
ColumnFilter
|
+TraversalMatcher
+------------------+------+---------+-------------+----------------+
| Operator | Rows | DbHits | Identifiers | Other |
+------------------+------+---------+-------------+----------------+
| ColumnFilter | 2 | 0 | | keep columns r |
| TraversalMatcher | 2 | 2265843 | | a, r, a |
+------------------+------+---------+-------------+----------------+
How can I force cypher to use existing index to search single relationship?