【问题标题】:Cyclic dependency detected (MongoDB Atlas Index)检测到循环依赖(MongoDB Atlas Index)
【发布时间】:2019-01-10 10:39:56
【问题描述】:

我使用 Python 创建了一个 MongoDB 数据库,现在想为地理空间查询的位置字段设置索引。位置字段如下所示

location{type:"Point", coordinates :[lat, lng]}

每当我尝试使用 MongoDB Atlas 在位置字段上创建索引时,我都会不断收到上述错误。

【问题讨论】:

    标签: mongodb mongodb-query geospatial pymongo-3.x


    【解决方案1】:

    问题解决了。我将坐标中的 lat, lng 更改为 lng, lat 并且它起作用了。

    【讨论】:

      猜你喜欢
      • 2022-10-07
      • 2013-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-11-08
      相关资源
      最近更新 更多