Neo4J:检查列表元素是否出现在匹配的节点中

Neo4J: checking if list elements are featured in matched nodes

我的 Neo4j 查询不工作 - 我不太明白为什么。

match (entry:Entry)
with split("\some space delimited string", " ") as i, 
split("\some space delimited string", " ") as j

where (any (x in entry.X.list where x in i) and any(y in entry.Y.list 
where y in j) and entry.parent="test_1.csv")
return entry

"Entry" 节点的属性由 X、Y 和 Z 参数组成。

我正在尝试使用 py2neo 将列表的 2 个字符串表示形式传递到密码查询中,过滤包含某些坐标系中 2 个列表的任何元素的交集的节点(即 X 的入口节点有一个来自列表 'i' 的元素并且入口节点的 Y 有一个来自列表 'j') 的元素 - 然后 return 入口。

但是,当我在 Neo4J 浏览器中 运行 查询时,它告诉我变量 "entry" 没有定义。

WITH 子句用于(除其他外)重新定义范围内的变量。由于您没有在 WITH 子句中包含 entry,它超出了范围,因此您不能在该点之后使用它,因此出现错误。

要解决此问题,只需在 WITH 子句中添加 entry 以及 ij:

...
with entry, split("\some space delimited string", " ") as i, 
split("\some space delimited string", " ") as j
...