Reputation: 15
We have millions of relationship property match queries to run on neo4j. For that we are using:
CALL db.index.fulltext.createRelationshipIndex("index_name", ["RELATIONSHIP_NAME"], ["PROPERTY_NAME"]);
for creating an index on relationship property.
But when we are writing a query to match a relationship property, neo4j is doing filter instead of index-seek-scan.
Is there any good way to create indexes on neo4j-4.1.0 such that every query uses the index to filter relationship property?
Upvotes: 0
Views: 333
Reputation: 6534
You want to update to Neo4j 4.3 where relationship indexes were introduced. Here is a complete list of what is new in Neo4j 4.3, but the most relevant for you are:
Relationship and Relationship Property Indexes Fast, Scalable Relationship Query Performance
A highly requested feature over the years by the community that we’re happy to finally introduce: Relationship type lookup indexes and relationship property indexes. These offer up new modeling capabilities, and significantly speed up many kinds of queries, by making it possible to index relationship types and properties.
Upvotes: 1