Skip to content

Commit 9734ca9

Browse files
author
Sam Kleinman
committed
merge: corrections
2 parents 74f6bc3 + 5a71275 commit 9734ca9

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

source/faq/developers.txt

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -590,12 +590,12 @@ the data returned by the query will reflect a single moment in time
590590

591591
.. warning::
592592

593-
You **cannot** use :method:`snapshot() <cursor.snapshot()>` with
594-
:term:`sharded collections <sharding>`.
593+
- You **cannot** use :method:`snapshot() <cursor.snapshot()>` with
594+
:term:`sharded collections <sharding>`.
595595

596-
You **cannot** use :method:`snapshot() <cursor.snapshot()>` with
597-
:method:`sort() <cursor.sort()>` or :method:`hint()
598-
<cursor.hint()>` cursor methods.
596+
- You **cannot** use :method:`snapshot() <cursor.snapshot()>` with
597+
:method:`sort() <cursor.sort()>` or :method:`hint()
598+
<cursor.hint()>` cursor methods.
599599

600600

601601
As an alternative, if your collection has a field or fields that are
@@ -612,6 +612,6 @@ explicitly force the query to use that index.
612612
query; then the cursor will return the same document more than
613613
once.
614614

615-
.. [#id-is-immutable] MongoDB does permit changes to the value of the
616-
``_id`` field, it is not possible for a cursor that transverses
615+
.. [#id-is-immutable] MongoDB does not permit changes to the value of the
616+
``_id`` field; it is not possible for a cursor that transverses
617617
this index to pass the same document more than once.

source/tutorial/getting-started.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -344,14 +344,14 @@ the following procedure:
344344

345345
{ "_id" : ObjectId("4c220a42f3924d31102bd858"), "x" : 4, "j" : 3 }
346346

347-
When you access documents in a cursor using on its indexed position
348-
in an array, :program:`mongo` must iterate all documents with lower
349-
index values.
350-
351-
For example, if you access the document at ``c[4]``,
352-
:program:`mongo` must load and iterate through the documents at
353-
``c[0]`` through ``c[3]`` in addition to ``c[4]``. For very large
354-
result sets, :program:`mongo` may run out of available memory.
347+
When you access documents in a cursor using the array index
348+
notation, :program:`mongo` first calls the ``cursor.toArray()``
349+
method and loads into RAM all documents returned by the cursor. The
350+
index is then applied to the resulting array. This operation
351+
iterates the cursor completely and exhausts the cursor.
352+
353+
For very large result sets, :program:`mongo` may run out of
354+
available memory.
355355

356356
For more information on the cursor, see :ref:`crud-read-cursor`.
357357

0 commit comments

Comments
 (0)