Automattic / Automattic/mongo-query
{ $exists: false ] FAILS
Open
- Dominant language
- JavaScript
- Stars
- 65
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
console.log(query.filter({ a: 3 }, { a: { $exists: true } } )); // yields {}
console.log(query.filter({ a: 3 }, { b: { $exists: false } } )); // yields false
filter.js line 94, is the root cause:
```
case 'undefined':
// if we can't find the key
return false;
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start at filter.js line 94 and reproduce the two console examples to trace how a missing key is handled. Check the $exists true and false cases against the reported results; done means both examples return the expected match or non-match instead of {} or false.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100