Update count vs. estimatedCount documentation.

Closes #3055
Original pull request: #3541.
This commit is contained in:
Christoph Strobl
2021-01-21 11:11:02 +01:00
committed by Mark Paluch
parent e644692a8a
commit 076d334b3c
5 changed files with 60 additions and 0 deletions

View File

@@ -2221,6 +2221,7 @@ With the introduction of <<mongo.transactions>> this was no longer possible beca
So in version 2.x `MongoOperations.count()` would use the collection statistics if no transaction was in progress, and the aggregation variant if so.
As of Spring Data MongoDB 3.x any `count` operation uses regardless the existence of filter criteria the aggregation-based count approach via MongoDBs `countDocuments`.
If the application is fine with the limitations of working upon collection statistics `MongoOperations.estimatedCount()` offers an alternative.
[NOTE]
====