-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Example (the same holds when using $exists: false or having other fields in the filter as well):
command: {
deleteMany: { filter: { _id: { '$exists': true } } }
},
rawResponse: {
errors: [
{
message: 'Invalid filter expression: $exists operator must have `BOOLEAN`',
errorCode: 'INVALID_FILTER_EXPRESSION',
id: '7a94d466-e9eb-4cef-8153-0454c65522d6',
family: 'REQUEST',
title: 'Invalid filter expression',
scope: 'FILTER'
}
]
}
Using $exists on other fields doesn't seem to cause issues (e.g. { other_field: { $exists: true } }).
I haven't extensively tested, but I believe the issue is universal with any filter, not just on deleteMany. Here's findOne, for example, having the same issue:
command: {
findOne: {
filter: { _id: { '$exists': false } }
}
},
rawResponse: {
errors: [
{
message: 'Invalid filter expression: $exists operator must have `BOOLEAN`',
errorCode: 'INVALID_FILTER_EXPRESSION',
id: '4893310d-ed09-4af0-8463-edd71e034c2e',
family: 'REQUEST',
title: 'Invalid filter expression',
scope: 'FILTER'
}
]
}
Metadata
Metadata
Assignees
Labels
No labels