Skip to content

DOCS-10886: adding allowPartialResults cursor method into cursor methods doc #2996

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions source/includes/ref-toc-method-cursor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@ name: ":method:`cursor.addOption()`"
file: /reference/method/cursor.addOption
description: "Adds special wire protocol flags that modify the behavior of the query.'"
---
name: ":method:`cursor.allowPartialResults()`"
file: /reference/method/cursor.allowPartialResults
description: "For a find query against a sharded cluster, returns partial results rather than error when one or more shards are unavailable."
---
name: ":method:`cursor.batchSize()`"
file: /reference/method/cursor.batchSize
description: "Controls the number of documents MongoDB will return to the client in a single network message."
Expand Down
20 changes: 20 additions & 0 deletions source/reference/method/cursor.allowPartialResults.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
========================
cursor.allowPartialResults()
========================

.. default-domain:: mongodb

Definition
----------

.. method:: cursor.allowPartialResults()

For a find query against a sharded cluster, returns partial results
rather than error when one or more shards are unavailable.

The :method:`~cursor.allowPartialResults()` method has the following
prototype form:

.. code-block:: javascript

db.collection.find(<query>).allowPartialResults()