unable to find index for $geoNear query
发布于 4 年前 作者 alu 6530 次浏览 来自 问答
  • 当前 Bug 的表现(可附上截图)

- 预期表现


  • 复现路径
  • 提供一个最简复现 Demo

        const db = wx.cloud.database({

          env: app.globalData.envstr

        })

        db.collection(‘SalePlace’).where({

          FPoint: db.command.geoNear({

            geometry: db.Geo.Point(113.323809, 23.097732), //res.longitude, res.latitude),

            maxDistance: 5000,

            minDistance:1000,

          })

        }).get().then(console.log)

2 回复

升级了也不行啊,还是报这个错

 找到原因了,不能用稳定版的开发工具,必须用开发版的,在云开发界面里会有地点类型的索引可以创建

回到顶部