Cypher Query结合了可以整体订购的结果

时间:2013-03-07 13:40:55

标签: neo4j cypher

我有一个Cypher查询,它结合了两个结果集,我希望这些结果集作为合并结果排序。

我想要做的一个例子是:http://console.neo4j.org/r/j2sotz

出现错误:

Cached(nf of type Collection) expected to be of type Map but it is of type Collection - maybe aggregation removed it?

有没有办法将多个结果收集到一个可以分页,排序等的结果中?

有很多关于组合结果的帖子,但我找不到任何允许将它们视为地图的帖子。

感谢您的帮助。

1 个答案:

答案 0 :(得分:2)

您可以收集到这样的结果:

Start n=node(1)match n-[r]->m 
with m.name? as outf, n 
match n<-[r]-m 
with m.name? as inf, outf 
return collect(outf) + collect(inf) as f 

此处涵盖了工会:https://github.com/neo4j/neo4j/issues/125(目前暂不提供)。 我还没有看到任何关于专门排序集合的事情。

相关问题