在嵌入式Java API中,可以使用Lucene构造添加排序.
http://docs.neo4j.org/chunked/milestone/indexing-lucene-extras.html#indexing-lucene-query-objects http://blog.richeton.com/2009/05/12/lucene-sort-tips /
在服务器模式下,您可以将?order参数传递给lucene查询查询.
http://docs.neo4j.org/chunked/milestone/rest-api-indexes.html#rest-api-find-node-by-query
根据您索引数据的方式(不是数字,因为lucene查询语法解析器和数字搜索有问题:()),在cypher中你可以这样做:
start n=node:myindes('time: [1 to 1000]') return n order by n.time asc
Run Code Online (Sandbox Code Playgroud)
还有更多图形化的方法,例如通过将事件与NEXT关系链接起来并返回此列表中的头部和后续n个元素
http://docs.neo4j.org/chunked/milestone/cypher-cookbook-newsfeed.html
或者为时间创建树结构:
http://docs.neo4j.org/chunked/milestone/cypher-cookbook-path-tree.html
| 归档时间: |
|
| 查看次数: |
805 次 |
| 最近记录: |