开发者社区 问答 正文

Mongodb 2dsphere索引针对的是什么面?

Mongodb 2dsphere索引针对的是什么面?

展开
收起
真的很搞笑 2022-03-14 22:02:15 856 分享 版权
1 条回答
写回答
取消 提交回答
  • Mongodb 2dsphere索引针对的是球面。

    db.places.ensureIndex( { loc : "2dsphere"} )

    $geometry表示查询的几何图片,type表示类型:polygon 多边形。

    2022-03-14 22:03:45
    赞同 展开评论