1.看到官网介绍里面矩形$box方法只支持2d索引。
Only the 2d geospatial index supports $box.
官方也推荐使用2dsphere索引。我现在了解到的方法geoWithinBox使用的是2d索引,而不是我在文档中创建的{loc:2dsphere}索引。
Filters.geoWithinBox("loc", double lowerLeftX, double lowerLeftY, double upperRightX, double upperRightY)
请教一下该怎么写才能查询矩形的时候使用我创建的2dsphere索引。