cypher - 如何在 Neo4j 中创建 geohash 树
问题描述
基于此处的问题,专家已使用此代码回答:
CALL spatial.addPointLayerGeohash('my_geohash_layer_name')
CREATE (n:Node {latitude:60.1,longitude:15.2}) WITH n
CALL spatial.addNode('my_geohash_layer_name',n) YIELD node
RETURN node
创建一个组织空间节点的geohash树。
所以我尝试了两个空间节点,但与 R-tree 不同的是,空间节点没有通过任何连接链接到层!?这段代码是真的吗?或者有什么问题?
解决方案
如果你想要一个 in-graph 树结构作为索引,你需要使用 RTree 索引(这是 Neo4j Spatial 中的默认值)。如果你想要一个 geohash 索引,图中将没有树,因为 geohash 被存储为字符串前缀搜索的 lucene 索引中的字符串。字符串前缀搜索是搜索基于 geohash 的索引的常用方法。
推荐阅读
- javascript - 电子:总是返回 ontouchstart = true
- angularjs - 如何在 angular.forEach 中动态添加 ng-model
- android-manifest - 合并的 AndroidManifest.xml 文件中的问题
- c++ - C ++中的命令处理器与控制台
- python - Python / Celery:杀死父任务时如何杀死子任务?
- c++ - 分段 FTP 上传
- kofax - 从文档类中删除导出脚本时不显示 UI
- polymer - 如何实现滚动到 Polymer 3 app-header=layout 中的元素?
- nuget - 什么是 nuget props 文件,它的用途是什么?
- http - 可以针对 .com 等顶级域设置 cookie