Open
Description
New Feature / Enhancement Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
Current Limitation
currently it's not possible to set allowDiskUse
as option to queries
Feature / Enhancement Description
according to this comment, starting with mongo v5.12.8 it would be possible to pass allowDiskUse
through setOptions
Automattic/mongoose#10177 (comment)
await Test.find().sort({ name: 1 }).setOptions({ allowDiskUse: true }).exec();
Example Use Case
query.find({ allowDiskUse: true }).then(function(results) {
// Request succeeded
}, function(error) {
// Request failed
});
Alternatives / Workarounds
N/A
3rd Party References
N/A