查询附近的MongoDB无法检索位置

时间:2019-06-29 19:40:31

标签: java database mongodb mongodb-query mongoid

我正在使用带有NEAR查询的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 个答案:

没有答案