$match で OR を実行することは可能ですか?
つまり、次のようなことです:
db.articles.aggregate(
{ $or: [ $match : { author : "dave" }, $match : { author : "john" }] }
);
ベストアンサー1
$match: { $or: [{ author: 'dave' }, { author: 'john' }] }
このように、演算子は通常関数$match
に入力するものを取得するだけなのでfind()