Neo4j查询通过S.D.N执行时返回BadInputException
在Neo4j查询通过S.D.N执行时返回BadInputException,neo4j,spatial,spring-data-neo4j,Neo4j,Spatial,Spring Data Neo4j,在Spring Data论坛上问过同样的问题,但认为它与Neo4j API有关。在webadmin中运行时,查询工作正常。 请求/响应,如下所示。更新:-在硬编码并传递值时工作正常 POST /db/data/cypher HTTP/1.1 Accept: application/json;stream=true X-Stream: true Content-Type: application/json User-Agent: neo4j-rest-graphdb/0 Host: localho
Spring Data
论坛上问过同样的问题,但认为它与Neo4j API
有关。在webadmin
中运行时,查询工作正常。
请求/响应,如下所示。更新:-在硬编码并传递值时工作正常
POST /db/data/cypher HTTP/1.1
Accept: application/json;stream=true
X-Stream: true
Content-Type: application/json
User-Agent: neo4j-rest-graphdb/0
Host: localhost:7000
Connection: keep-alive
Transfer-Encoding: chunked
b1
{"query":"START n=node:LAT_LONG('withinDistance:[{0},{1}, {2}]') match n<-[:address]-(location)<-[:CONTAINS]-(pol) return pol","params": {"2":50.0,"1":-74.598347,"0":39.274423}}
0
到我在
Spring
论坛中的问题的链接是您不能在索引查询的字符串中使用参数'withincidence:[{0},{1},{2}]
,您必须将整个索引查询作为参数提供
{"query":"START n=node:LAT_LONG({indexQuery})
match n<-[:address]-(location)<-[:CONTAINS]-(pol)
return pol",
"params": {"indexQuery": "withinDistance:[39.27442339.274423, -74.598347, 50.0 ]"} }
{“query”:“START n=node:LAT_LONG({indexQuery})
匹配
{"query":"START n=node:LAT_LONG({indexQuery})
match n<-[:address]-(location)<-[:CONTAINS]-(pol)
return pol",
"params": {"indexQuery": "withinDistance:[39.27442339.274423, -74.598347, 50.0 ]"} }