cancel
Showing results for 
Search instead for 
Did you mean: 

Indexing links

leonard_panichi
Node Clone

Hi,
I have a graph with a lot of relationships and I would like to have an index on one link type.
The goal is to run queries such as

match(n)<-[l:is_linked]-(p) 
where l.uuid = "405b6b8b-139a-4569-a695-708d018e61c1"
return n, p

And avoid the huge AllNodesScan, expandAll and filter of this query. What I need is simply a constraint assert unique on link property.
Is that possible ? I tried the relationship property existence constraint but it doesn't index things.

2 REPLIES 2

In 3.5 you can have fulltext indexes on relationships, see https://neo4j.com/docs/cypher-manual/3.5/schema/index/#schema-index-fulltext-search.

Excellent, works perfectly as expected, thank you very much

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

On November 16 and 17 for 24 hours across all timezones, you’ll learn about best practices for beginners and experts alike.