Neo4j spatial cypher query withinDistance doesn't return existing nodes

后端 未结 2 1198
佛祖请我去吃肉
佛祖请我去吃肉 2021-01-14 14:28

I am using the spatial server plugin for Neo4j 2.0 and have followed the guide at http://neo4j.github.io/spatial/ to add a node with name Stockholm.

:POST h         


        
2条回答
  •  半阙折子戏
    2021-01-14 15:17

    In order to query using Cypher you'll need to add each node to an index:

        :POST http://localhost:7474/db/data/index/node/geom
        {
          'value': 'dummy', 
          'key': 'dummy', 
          'uri': 'http://localhost:7474/db/data/node/NODE_ID_HERE'
        }
    

    I wrote a blog post about getting starting with Neo4j Spatial recently that covers this: http://lyonwj.com/mapping-the-worlds-airports-with-neo4j-spatial-and-openflights-part-1/

提交回复
热议问题