File tree Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Expand file tree Collapse file tree 2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -590,12 +590,12 @@ the data returned by the query will reflect a single moment in time
590
590
591
591
.. warning::
592
592
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>`.
595
595
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.
599
599
600
600
601
601
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.
612
612
query; then the cursor will return the same document more than
613
613
once.
614
614
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
617
617
this index to pass the same document more than once.
Original file line number Diff line number Diff line change @@ -344,14 +344,14 @@ the following procedure:
344
344
345
345
{ "_id" : ObjectId("4c220a42f3924d31102bd858"), "x" : 4, "j" : 3 }
346
346
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.
355
355
356
356
For more information on the cursor, see :ref:`crud-read-cursor`.
357
357
You can’t perform that action at this time.
0 commit comments