我要查询一个状态:“ CLOSED” $或“ PAID_IN_FULL”
阅读文档并尝试了各种方法,但似乎语法不正确
{
'lineItems.url': /.*mercari.*/i,
status: 'PAID_IN_FULL',
createdAt: {
$gte: ISODate("2019-01-01T00:00:00.000Z"),
$lt: ISODate("2019-12-20T00:00:00.000Z")
}
}
{
'lineItems.url': /.*mercari.*/i,
status: 'CLOSED',
createdAt: {
$gte: ISODate("2019-01-01T00:00:00.000Z"),
$lt: ISODate("2019-12-20T00:00:00.000Z")
}
}
答案 0 :(得分:1)
{
'lineItems.url': /.*mercari.*/i,
$or : [
{ status: 'CLOSED' },
{ status: 'PAID_IN_FULL' },
],
createdAt: {
$gte: ISODate("2019-01-01T00:00:00.000Z"),
$lt: ISODate("2019-12-20T00:00:00.000Z")
}
}