Skip to content

Improve section about query modifiers a little more. #1229

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 1 commit into from
Closed
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
9 changes: 5 additions & 4 deletions source/core/sharded-cluster-query-router.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ cursors on the shards.
In versions prior to 2.0.5, the :program:`mongos` exhausted each
cursor, one by one.

If the queries specifies sorted results using the
If the query specifies sorted results using the
:method:`~cursor.sort()` cursor method, the :program:`mongos` instance
passes the :operator:`$orderby` option to the shards. When the
:program:`mongos` receives results it performs a *merge sort* of the
results.
:program:`mongos` receives results it performs an incremental *merge sort*
of the results while returning them to the client.

If the query limits the size of the result set using the
:method:`~cursor.limit()` cursor method, the :program:`mongos`
Expand All @@ -102,7 +102,8 @@ to the result before returning the result to the client.

If the query specifies a number of records to *skip* using the
:method:`~cursor.skip()` cursor method, the :program:`mongos` *cannot*
pass the skip to the shards, and trims the result set when assembling
pass the skip to the shards, but rather retrieves unskipped results
from the shards and skips the appropriate number of documents when assembling
the complete result. However, when used in conjunction with a
:method:`~cursor.limit()`, the :program:`mongos` will pass the *limit*
plus the value of the :method:`~cursor.skip()` to the shards to
Expand Down