Neo4j, get all relationships between a set of nodes

后端 未结 6 1095
遥遥无期
遥遥无期 2021-01-05 00:13

I\'ve a query that fetches nodes based on a property

MATCH (c { type: \'sometype\' })
WITH c LIMIT 100
RETURN c

all I want is to also fetch

6条回答
  •  不知归路
    2021-01-05 00:46

    It's better if you used labels instead of a property for type. This will make your queries very fast using schema indexes.

    MATCH (a:SOMETYPE) -[r] - (b :SOMETYPE) RETURN DISTINCT r
    

提交回复
热议问题