【发布时间】:2013-05-23 00:29:13
【问题描述】:
MongoDB 有一个由 https://jira.mongodb.org/browse/SERVER-478 描述的奇妙问题(以及更通用的版本 https://jira.mongodb.org/browse/SERVER-589)
作为一种解决方法,我试图将我的查询表达为 and,not and size 的组合:
{ '$match' => {
'$and' => [
items: {'$and' => ['$size' => 0, '$size' => 1, ... until the length I need is reached]},
...
],
}},
我不断收到failed with error 10068: "exception: invalid operator: $and"。我是否忽略了一些非常明显的东西?
【问题讨论】:
标签: mongodb aggregation-framework