Javaで、このシェルクエリ(MongoDB)を「翻訳」する必要があります。
db.runCommand( { geoNear: 'test', near: {type: "Point", coordinates: [115.0. 12.0]}, spherical: true, maxDistance: 40000})
私は mongo-java-driver:3.1.0 を使用しています。このクエリをシェルでテストしたところ、正常に動作しました。
書類:
{id: "test", "geometry": { "type": "Point", "coordinates": [115.2, 12.2]}}