Python中文网

一个关于 编程问题的解答网站.

有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

java MongoDB near query检索位置失败

我使用的是MongoDB,带有一个用于检索位置的近似查询

当我在查询中使用经度=-90时,它可以正常工作,但如果我的经度低于-90。。MongoDB正在崩溃

com.mongodb.MongoCommandException: Command failed with error -1: 'Can't parse filter / create query' on server ******.*****.com:4353. The full response is { "ok" : 0.0, "errmsg" : "Can't parse filter / create query", "operationTime" : { "$timestamp" : { "t" : 1561702150, "i" : 1 } }, "$clusterTime" : { "clusterTime" : { "$timestamp" : { "t" : 1561702150, "i" : 1 } }, "signature" : { "hash" : { "$binary" : "XWJh9UrqNGU9NDwMOx2MsG4yJcA=", "$type" : "00" }, "keyId" : { "$numberLong" : "6698286035400392705" } } } }
    at com.mongodb.connection.ProtocolHelper.getCommandFailureException(ProtocolHelper.java:164) ~[mongodb-driver-core-3.6.4.jar!/:na]
    at com.mongodb.connection.InternalStreamConnection.receiveCommandMessageResponse(InternalStreamConnection.java:295) ~[mongodb-driver-core-3.6.4.jar!/:na]
    at com.mongodb.connection.InternalStreamConnection.sendAndReceive(InternalStreamConnection.java:255) ~[mongodb-driver-core-3.6.4.jar!/:na]

为什么“near”查询只接受-90以下的值。当经度低于-90度时断裂


共 (0) 个答案