jejking / hh-nord-geocoder

tm470
GNU General Public License v3.0
0 stars 0 forks source link

Ensure spatial nodes are added explicitly to spatial index to enable cypher querying #25

Open jejking opened 10 years ago

jejking commented 10 years ago

Given https://github.com/neo4j-contrib/spatial/issues/106 it seems necessary to add spatial nodes explicitly to the index associated with a layer and not just to the layer itself.

Also cf the discussion at http://stackoverflow.com/questions/17966722/neo4j-spatial-withindistance-cypher-query-returns-empty-while-rest-call-return

Otherwise the index returns an empty set, eg. for our test case START n=node:GEO('withinDistance:[53.xxxx, 10.xxx, 0.5]') RETURN n where we get an empty set after creating the gazetteer whereas we should get lots of streets and other things.

jejking commented 10 years ago

Test code shows that in fact SpatialRecordHits does not iterate correctly. For example, I can find 53 hits in a bounding box but the iterator returns nothing - but it is clear from the debugger that the underlying SpatialDatabaseRecord list looks quite correct.

jamilabreu commented 9 years ago

+1 to this :)