I've been searching for this problem almost 2 days without any result I have found different questions in stackoverflow and neo4j groups but none of them fixed the problem(probably I'm doing something wrong?)
I recently downloaded neo4j 2.1.3 enterprise and tried to use withinDistance in cypher(Also tested in 2.0.1)
I found this question in stackoverflow and did peter's suggestion but nothing changed Neo4j Spatial 'WithinDistance' Cypher query returns empty while REST call returns data
The steps I do
Create the layer
POST http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addSimplePointLayer
{
'layer': 'userPosition',
'lat': 'latitude',
'lon': 'longitude'
}
Create the index
POST http://localhost:7474/db/data/index/node
{
'name': 'userPosition',
'config[provider]': 'spatial',
'config[geometry_type]': 'point',
'config[lat]': 'latitude',
'config[lon]': 'longitude'
}
Created a node with attributes longitude and latitude After that add the node to index
POST http://localhost:7474/db/data/index/node/userPosition
{
'key': 'dummy',
'value': 'dummy',
'uri': 'http://localhost:7474/db/data/node/NODE_ID'
}
And at the end add the node to the layer
POST http://localhost:7474/db/data/ext/SpatialPlugin/graphdb/addNodeToLayer
{
'layer': 'userPosition',
'node': 'http://localhost:7474/db/data/node/NODE_ID'
}
For testing I use lon, lat (1,1) Using findGeometriesWithinDistance by REST works but the cypher query using withinDistance doesn't work :(
Any help I'm really thinking about giving up on neo4j because of this :(