I am using neo4j 2.1.4. I have nodes - POINT and relationships - ROAD I have an index for the ROAD property - OBJ_COD
:schema ls -l :ROAD Indexes ON :ROAD(OBJ_COD) ONLINE ON :ROAD(ID) ONLINE No constraints
I want to find 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 to get cypher to use an existing index to search for single relationships?
source share