Neo4j 2.0M3 Spatial 0.12 - Spatial doesn't return any result for my query -
i following tutorial @ http://neo4j.github.io/spatial/#rest-api-add-a-node-to-the-spatial-index test spatial 0.12 neo4j 2.0m03. trying simplepointlayer example, nodes within radius.
although looks created (layer, index etc..) expected , domain nodes indexed properly, cypher query or java spatial query code not return result.
when try exact same thing neo4j 1.9 , spatial 0.11, works fine.
before digging issue further wanted ask neo4j community first if known issue or not. in advance.
-- testing steps based on peter's comment --
geo_layer.json:
{ "layer" : "geom", "lat" : "lat", "lon" : "lon" } curl -h "content-type: application/json" -x post -d @geo_layer.json http://localhost:7474/db/data/ext/spatialplugin/graphdb/addsimplepointlayer geo_index.json:
{ "name" : "geom", "config" : { "provider" : "spatial", "geometry_type" : "point", "lat" : "lat", "lon":"lon" } } curl -h "content-type: application/json" -x post -d @geo_index.json http://localhost:7474/db/data/index/node geo_node.json:
{ "lat" : 60.1, "lon" : 15.2 } curl -h "content-type: application/json" -x post -d @geo_node.json http://localhost:7474/db/data/node new node's id 5 - started empty graph.
domain_node.json:
{ "value": "dummy", "key": "dummy", "uri": "http://localhost:7474/db/data/node/5" } curl -h "content-type: application/json" -x post -d @domain_node.json http://localhost:7474/db/data/index/node/geom cypher_query.json:
{ "query": "start node = node:geom('withindistance:[60.0,15.0, 100.0]') return node;" } curl -h "content-type: application/json" -x post -d @cypher_query.json http://localhost:7474/db/data/cypher the result:
{ "message" : "org.neo4j.gis.spatial.indexprovider.geopipeflowhits.iterator()lorg/neo4j/graphdb/resourceiterator;", "exception" : "abstractmethoderror", "fullname" : "java.lang.abstractmethoderror", "stacktrace" : [ "org.neo4j.cypher.internal.spi.gdsimpl.transactionboundquerycontext$nodeoperations.indexquery(transactionboundquerycontext.scala:120)", "org.neo4j.cypher.internal.spi.delegatingoperations.indexquery(delegatingquerycontext.scala:107)", "org.neo4j.cypher.internal.executionplan.builders.entityproducerfactory$$anonfun$2$$anonfun$applyorelse$2.apply(entityproducerfactory.scala:70)", "org.neo4j.cypher.internal.executionplan.builders.entityproducerfactory$$anonfun$2$$anonfun$applyorelse$2.apply(entityproducerfactory.scala:68)", "org.neo4j.cypher.internal.executionplan.builders.entityproducerfactory$$anon$1.apply(entityproducerfactory.scala:38)", "org.neo4j.cypher.internal.executionplan.builders.entityproducerfactory$$anon$1.apply(entityproducerfactory.scala:37)", "org.neo4j.cypher.internal.pipes.startpipe$$anonfun$internalcreateresults$1.apply(startpipe.scala:34)", "org.neo4j.cypher.internal.pipes.startpipe$$anonfun$internalcreateresults$1.apply(startpipe.scala:33)", "scala.collection.iterator$$anon$13.hasnext(iterator.scala:371)", "org.neo4j.cypher.internal.closingiterator$$anonfun$hasnext$1.apply$mcz$sp(closingiterator.scala:36)", "org.neo4j.cypher.internal.closingiterator$$anonfun$hasnext$1.apply(closingiterator.scala:35)", "org.neo4j.cypher.internal.closingiterator$$anonfun$hasnext$1.apply(closingiterator.scala:35)", "org.neo4j.cypher.internal.closingiterator.failifthrows(closingiterator.scala:84)", "org.neo4j.cypher.internal.closingiterator.hasnext(closingiterator.scala:35)", "org.neo4j.cypher.pipeexecutionresult.hasnext(pipeexecutionresult.scala:157)", "scala.collection.iterator$$anon$11.hasnext(iterator.scala:327)", "scala.collection.convert.wrappers$iteratorwrapper.hasnext(wrappers.scala:29)", "org.neo4j.cypher.pipeexecutionresult$$anon$1.hasnext(pipeexecutionresult.scala:73)", "org.neo4j.helpers.collection.exceptionhandlingiterable$1.hasnext(exceptionhandlingiterable.java:58)", "org.neo4j.helpers.collection.iteratorwrapper.hasnext(iteratorwrapper.java:42)", "org.neo4j.server.rest.repr.listrepresentation.serialize(listrepresentation.java:58)", "org.neo4j.server.rest.repr.serializer.serialize(serializer.java:75)", "org.neo4j.server.rest.repr.mappingserializer.putlist(mappingserializer.java:61)", "org.neo4j.server.rest.repr.cypherresultrepresentation.serialize(cypherresultrepresentation.java:83)", "org.neo4j.server.rest.repr.mappingrepresentation.serialize(mappingrepresentation.java:42)", "org.neo4j.server.rest.repr.outputformat.assemble(outputformat.java:185)", "org.neo4j.server.rest.repr.outputformat.formatrepresentation(outputformat.java:133)", "org.neo4j.server.rest.repr.outputformat.response(outputformat.java:119)", "org.neo4j.server.rest.repr.outputformat.ok(outputformat.java:57)", "org.neo4j.server.rest.web.cypherservice.cypher(cypherservice.java:96)", "java.lang.reflect.method.invoke(method.java:601)", "org.neo4j.server.rest.security.securityfilter.dofilter(securityfilter.java:112)" ] -- alternatively --
location.json:
{ "layer" : "geom", "node" : "http://localhost:7474/db/data/node/5" } curl -h "content-type: application/json" -x post -d @location.json http://localhost:7474/db/data/ext/spatialplugin/graphdb/addnodetolayer geo_query.json:
{ "layer" : "geom", "distanceinkm" : "100", "pointx" : "15", "pointy" : "60" } curl -h "content-type: application/json" -x post -d @geo_query.json http://localhost:7474/db/data/ext/spatialplugin/graphdb/findgeometrieswithindistance returns empty result set.
make sure adding node index prior querying via cypher, creates necessary structurs in db, see https://github.com/neo4j/spatial/blob/master/src/test/java/org/neo4j/gis/spatial/spatialpluginfunctionaltest.java#l268
Comments
Post a Comment