Wednesday, 15 January 2014

neo4j - Cypher query: return empty result when adding one match twice -



neo4j - Cypher query: return empty result when adding one match twice -

the query followings , empty result. when remove person-[:teach]-lesson, works fine. can tell me reason? cheers

start person=node(1) match person-[:teach|learn]-lesson, person-[:teach]-lesson homecoming person,lesson

you don't have teach relation between person , lesson.

match person-[:teach|learn]-lesson, person-[:teach]-lesson

is match person-[:teach|learn]-lesson , match person[:teach]-lesson, repetition anyway.

start person=node(1) match person-[:teach|learn]-lesson homecoming person,lesson

will work if want match teach or larn (as long @ to the lowest degree 1 of them exists, you'll result).

neo4j cypher

No comments:

Post a Comment