how to create geohash tree in neo4j

≯℡__Kan透↙ 提交于 2019-12-11 04:35:01

问题


Based on a problem here an expert have answered with this code:

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

to create a geohash tree that organise spatial nodes.

so i tried that with two spatial nodes but unlike R-tree the spatial nodes aren't linked to the layer with any connection !? is this code true ? or what is wrong ?


回答1:


If you want an in-graph tree structure as an index, you need to use the RTree index (which is the default in Neo4j Spatial). If you want a geohash index, there will be no tree in the graph because geohashes are being stored as strings in a lucene index for string prefix searches. String prefix searches are a common way of searching geohash based indexes.



来源:https://stackoverflow.com/questions/50913970/how-to-create-geohash-tree-in-neo4j

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!