diff --git a/source/reference/aggregation.txt b/source/reference/aggregation.txt index f9e63f99..ee29d556 100644 --- a/source/reference/aggregation.txt +++ b/source/reference/aggregation.txt @@ -98,6 +98,14 @@ find the total number of documents which have the exact array count = coll.count({ 'categories' => [ 'Chinese', 'Seafood' ] }) +.. note:: + + The ``count`` method is not the same as the ``countDocuments`` + method and may not support the same filters. ``countDocuments`` uses the + ``$match`` stage of the aggregation pipeline to filter documents. To learn more + about limitations of the ``$match`` stage, see :manual:`$match Restrictions ` + in the MongoDB Server manual. + Distinct ~~~~~~~~