Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/jsp/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Neo4j查询通过S.D.N执行时返回BadInputException_Neo4j_Spatial_Spring Data Neo4j - Fatal编程技术网

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 ]"} }