Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
neo4j中具有多重关系的In子句_Neo4j_Cypher - Fatal编程技术网

neo4j中具有多重关系的In子句

neo4j中具有多重关系的In子句,neo4j,cypher,Neo4j,Cypher,我想在in子句中查询-n个组织,以获取为该组织工作的所有实体以及从该组织中受益的实体。我有这样一个问题: match(e1:Entity)<-[r1:ORG_BENEFITS]-(o:Organization)<-[r2:WORKS_FOR_ORGANIZATION]-(e2:Entity) where o.id IN ['11','22','33','44','55'] return o.id as org, collect(DISTINCT e1) as gettingBen

我想在
in
子句中查询-n个
组织
,以获取为该组织工作的所有实体以及从该组织中受益的实体。我有这样一个问题:

match(e1:Entity)<-[r1:ORG_BENEFITS]-(o:Organization)<-[r2:WORKS_FOR_ORGANIZATION]-(e2:Entity) 
where o.id IN ['11','22','33','44','55'] 
return o.id as org, collect(DISTINCT e1) as gettingBenefits, collect(DISTINCT e2) as worksForOrg

match(e1:Entity)数组中的每个组织是否都存在r1和r2?是否可能关系的方向错误?您是否尝试过在没有关系说明的情况下执行测试?e、 g.
match(e1:Entity)-[r1:ORG\u BENEFITS]-(o:Organization)-[r2:WORKS\u FOR\u Organization]-(e2:Entity)
@frant.hartm是的,数组中的每个组织都存在r1和r2。@DaveBennett关系的方向是正确的,尽管我也尝试过没有方向。@shaw.ram所以如果您删除例如r2,e2匹配的一部分,然后它正确返回n行(对于n大小的数组)和正确的数据?你有一些样本数据吗?