What is the difference between multiple MATCH clauses and a comma in a Cypher query?

后端 未结 5 694
死守一世寂寞
死守一世寂寞 2021-02-01 02:43

In a Cypher query language for Neo4j, what is the difference between one MATCH clause immediately following another like this:

MATCH (d:Document{document_ID:2})
         


        
5条回答
  •  春和景丽
    2021-02-01 03:04

    There is a difference: comma separated matches are actually considered part of the same pattern. So for instance the guarantee that each relationship appears only once in resulting path is upheld here.

    Separate MATCHes are separate operations whose paths don't form a single patterns and which don't have these guarantees.

提交回复
热议问题