Reputation: 5617
I want to do a single query for status: 'CLOSED' $or 'PAID_IN_FULL'
read the docs and tried all kinds of things, but can't seem to get the syntax right
{
'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")
}
}
Upvotes: 0
Views: 31
Reputation: 419
{
'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")
}
}
Upvotes: 1