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-Cypher查询&x27;s属性_Neo4j_Cypher - Fatal编程技术网

关于多重关系的Neo4j-Cypher查询&x27;s属性

关于多重关系的Neo4j-Cypher查询&x27;s属性,neo4j,cypher,Neo4j,Cypher,我更新了与属性的关系Expirydate。我想排除遍历路径中所有过期的关系。查询条件是通过path中的所有关系检查Expirydate。我得到了一个错误: ==>语法异常: ==> ==>我们认为这里应该有更好的错误信息吗?请将此查询发送到以帮助我们cypher@neo4j.org. 以下是查询: START sNode=node(530) MATCH sNode-[r:hasRegisteredPlate|inHouseHoldWith*1..2]->eNode WHERE eNo

我更新了与属性的关系
Expirydate
。我想排除遍历路径中所有过期的关系。查询条件是通过path中的所有关系检查
Expirydate
。我得到了一个错误:

==>语法异常: ==> ==>我们认为这里应该有更好的错误信息吗?请将此查询发送到以帮助我们cypher@neo4j.org.

以下是查询:

START sNode=node(530) 
MATCH sNode-[r:hasRegisteredPlate|inHouseHoldWith*1..2]->eNode 
WHERE eNode.NodeType = "Plate" and (rel in r:(not has(rel.ExpiryDate) or 
    (has(rel.ExpiryDate) and (rel.ExpiryDate<>'' or rel.ExpiryDate >'2013-10-04')))) 
RETURN eNode LIMIT 20
START sNode=node(530)
匹配sNode-[r:hasRegisteredPlate | inHouseHoldWith*1..2]->eNode
其中eNode.NodeType=“Plate”和(r中的相对值):(不具有(相对值ExpiryDate)或
(具有(相对到期日)和(相对到期日“”或相对到期日>'2013-10-04'))
返回eNode限制20

非常感谢您的帮助

您可以尝试使用谓词
all

START sNode=node(530)
MATCH sNode-[r:hasRegisteredPlate|inHouseHoldWith*1..2]->eNode
WHERE eNode.NodeType = "Plate" and all(rel in r
  WHERE (not(has(rel.ExpiryDate)) or (has(rel.ExpiryDate) and (rel.ExpiryDate<>'' or rel.ExpiryDate>'2013-10-04')))
)
RETURN eNode LIMIT 20
START sNode=node(530)
匹配sNode-[r:hasRegisteredPlate | inHouseHoldWith*1..2]->eNode
其中eNode.NodeType=“Plate”和all(r中的rel
其中(非(具有(相对到期日))或(具有(相对到期日)和(相对到期日“”或相对到期日>'2013-10-04'))
)
返回eNode限制20
你也可以试试相反的方法

WHERE eNode.NodeType = "Plate" and none(rel in r
  WHERE (has(rel.ExpiryDate) and rel.ExpiryDate<'2013-10-04')
)
其中eNode.NodeType=“Plate”和none(r中的rel
其中(has(rel.ExpiryDate)和rel.ExpiryDate