【问题标题】:$sample equivalent in mongodb .find() [duplicate]mongodb .find() 中的 $sample 等效项 [重复]
【发布时间】:2018-02-08 15:22:20
【问题描述】:

不是将查询重写为aggregate 表达式以利用$sample 选项,还有.find() 操作的等效方法。我无法在 pymongo 中找到与 find 一起使用的任何内容。

【问题讨论】:

    标签: mongodb pymongo


    【解决方案1】:

    不,$sample 聚合运算符仅适用于聚合。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-10-02
      • 1970-01-01
      • 2013-01-31
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-22
      相关资源
      最近更新 更多