执行Neo4j查询时出错,包括点类型

时间:2018-09-19 02:14:13

标签: neo4j geo

neo4j版本3.4.0

gps节点包含三个属性:

坐标:点

位置:字符串

类型:字符串

例如: 坐标:point({srid:4326,x:30.655691,y:104.081602}),位置:上海,类型:gps

查询时遇到错误:

curl http://IP:PORT/db/data/transaction/commit -u xxxx:xxxx -H "Content-Type: application/json"
-d "{
"statements": [{
"statement": "match (n:gps) return n",
"parameters": {},
"includeStats": true,
"resultDataContents": ["rest"]
}]
}
"

错误如下: “ code”:“ Neo.TransientError.Network.CommunicationError”, “ message”:“当前上下文不是阵列而是对象”, “ stackTrace”:“ org.codehaus.jackson.JsonGenerationException:当前上下文不是数组而是对象

但是以下过程成功了

curl http://IP:PORT/db/data/transaction/commit -u xxxx:xxxx -H "Content-Type: application/json"
-d "{
"statements": [{
"statement": "match (n:gps) return n.coordinates,n.type,n.loacation",
"parameters": {},
"includeStats": true,
"resultDataContents": ["rest"]
}]
}
"

0 个答案:

没有答案