cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

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