【发布时间】:2019-01-13 13:09:59
【问题描述】:
我目前有一个请求:
CALL apoc.index.relationships('TO','context:15229100-b20e-11e3-80d3-6150cb20a1b9')
YIELD rel, start, end
有人知道我如何搜索多个context 值,例如:
CALL apoc.index.relationships('TO','context:15229100-b20e-11e3-80d3-6150cb20a1b9,context:a0328202-d98a-492e-92ae-1010cb829a8ee')
YIELD rel, start, end
apoc.index.relationships 有可能吗?
更新
一种可能的方法是使用UNION CALL 类似
CALL apoc.index.relationships('TO','context:15229100-b20e-11e3-80d3-6150cb20a1b9')
YIELD rel, start, end
UNION CALL apoc.index.relationships('TO','context:15229100-b20e-11e3-80d3-6150cb20a1b9,context:a0328202-d98a-492e-92ae-1010cb829a8ee')
YIELD rel, start, end
这会产生良好的效果。但我想知道是否有更优雅的方式来执行此操作,这也会使请求更短?
谢谢!
【问题讨论】:
标签: neo4j cypher neo4j-apoc