开发者社区 问答 正文

mongodb建立2dsphere索引报错

Exception in thread "main" com.mongodb.MongoException: exception: Can't extract geo keys: { _id: ObjectId('5559a5ac6516cd2268fa696c'), name: "xxx", point: [ 30.633134, 103.976095 ] } can't project geometry into spherical CRS: [ 30.633134, 103.976095 ]
一直建不起2dsphere索引,求大神指点。

展开
收起
落地花开啦 2016-02-25 16:58:51 5214 分享 版权
1 条回答
写回答
取消 提交回答
  • 喜欢技术,喜欢努力的人

    参考loc : { type: "Point", coordinates: [ -73.97, 40.77 ] },,你建立的索引字段格式对不对

    2019-07-17 18:47:41
    赞同 展开评论