Version 6.2.0
This release adds the .one()
method to a cursor - allowing you to quickly retrieve a single document from the .find()
method.
In addition to this, it is now possible to specify a read preference on a cursor using the .readFrom()
method. It is important to note that the MongoDB documentation explicitly mentions that you should not use this method as a way to gain "free read performance" as if any of your cluster's nodes go down you will hit performance constraints which would otherwise not be there.