Skip to content

Commit

Permalink
DOCSP-25129 cursor.count() applySkipLimit limitation (#6495)
Browse files Browse the repository at this point in the history
* DOCSP-25129 cursor.count() applySkipLimit limitation

* DOCSP-25129 updates for feedback

* Apply suggestions from code review

Co-authored-by: Ashley Brown <[email protected]>

* DOCSP-25129 updates for copy feedback

---------

Co-authored-by: Ashley Brown <[email protected]>
  • Loading branch information
kanchana-mongodb and mdb-ashley authored Feb 29, 2024
1 parent c23a396 commit e326d60
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions source/reference/method/cursor.count.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,16 +59,20 @@ Definition

- boolean

- Optional. Specifies whether to consider the effects of the
:method:`cursor.skip()` and :method:`cursor.limit()` methods in the
count. By default, the :method:`~cursor.count()` method
- Optional. :binary:`~bin.mongosh` ignores any value you set for
this option. The value defaults to ``true``.

The option specifies whether to consider the effects of the
:method:`cursor.skip()` and :method:`cursor.limit()` methods
in the count. By default, the :method:`~cursor.count()` method
ignores the effects of the :method:`cursor.skip()` and
:method:`cursor.limit()`. Set ``applySkipLimit`` to ``true`` to
consider the effect of these methods.
:method:`cursor.limit()`. You must set ``applySkipLimit`` to
``true`` to consider the effect of these methods.

.. note::



The legacy :binary:`~bin.mongo` shell, which is now
deprecated, used your setting for this option.

MongoDB also provides an equivalent :method:`db.collection.count()`
as an alternative to the ``db.collection.find(<query>).count()``
Expand Down

0 comments on commit e326d60

Please sign in to comment.