neo4j point类型bug
发布于 6 年前 作者 bingo 2398 次浏览 来自 分享

hi neo4j version 3.4.0 gps 节点 包含三个属性, coordinates: point location: string type: string eg: coordinates: point({srid:4326, x:30.655691, y:104.081602}) ,location: shanghai ,type: gps

通过原生的rest查询,包含point属性的整个节点时 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”] }] } " Error is as follows: “code”: “Neo.TransientError.Network.CommunicationError”, “message”: “Current context not an ARRAY but OBJECT”, “stackTrace”: "org.codehaus.jackson.JsonGenerationException: Current context not an ARRAY but OBJECT

下面又是执行成功的

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

回到顶部