Skip to content

Commit 293fdc3

Browse files
RUST-2081 Document filter restrictions for count_documents (#1352)
1 parent c72830c commit 293fdc3

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/action/count.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,12 @@ where
3939
}
4040
}
4141

42-
/// Gets the number of documents.
42+
/// Gets the number of documents. This method returns an accurate count.
4343
///
44-
/// Note that this method returns an accurate count.
44+
/// Certain query operators cannot be used in the filter provided to this method, including
45+
/// `$where` and `$near`. See the documentation for the `$match` aggregation pipeline stage for
46+
/// full details on these restrictions:
47+
/// https://www.mongodb.com/docs/manual/reference/operator/aggregation/match/#restrictions
4548
///
4649
/// `await` will return d[`Result<u64>`].
4750
#[deeplink]

0 commit comments

Comments
 (0)