Skip to content

ability to use allowDiskUse on mongo #7765

Open
@stewones

Description

@stewones

New Feature / Enhancement Checklist

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:featureNew feature or improvement of existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions