From 5a71275ca3c95bda2144f9a19ec312fab6825888 Mon Sep 17 00:00:00 2001 From: kay Date: Tue, 11 Dec 2012 20:21:33 -0500 Subject: [PATCH] DOCS-877 cleanup of faq snapshot and tutorial cursor info --- source/faq/developers.txt | 14 +++++++------- source/tutorial/getting-started.txt | 16 ++++++++-------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/source/faq/developers.txt b/source/faq/developers.txt index dfe13c59053..4ff517b523a 100644 --- a/source/faq/developers.txt +++ b/source/faq/developers.txt @@ -549,12 +549,12 @@ the data returned by the query will reflect a single moment in time .. warning:: - You **cannot** use :method:`snapshot() ` with - :term:`sharded collections `. + - You **cannot** use :method:`snapshot() ` with + :term:`sharded collections `. - You **cannot** use :method:`snapshot() ` with - :method:`sort() ` or :method:`hint() - ` cursor methods. + - You **cannot** use :method:`snapshot() ` with + :method:`sort() ` or :method:`hint() + ` cursor methods. As an alternative, if your collection has a field or fields that are @@ -571,6 +571,6 @@ explicitly force the query to use that index. query; then the cursor will return the same document more than once. -.. [#id-is-immutable] MongoDB does permit changes to the value of the - ``_id`` field, it is not possible for a cursor that transverses +.. [#id-is-immutable] MongoDB does not permit changes to the value of the + ``_id`` field; it is not possible for a cursor that transverses this index to pass the same document more than once. diff --git a/source/tutorial/getting-started.txt b/source/tutorial/getting-started.txt index 78b4e1e7d15..d09054af7e2 100644 --- a/source/tutorial/getting-started.txt +++ b/source/tutorial/getting-started.txt @@ -344,14 +344,14 @@ the following procedure: { "_id" : ObjectId("4c220a42f3924d31102bd858"), "x" : 4, "j" : 3 } - When you access documents in a cursor using on its indexed position - in an array, :program:`mongo` must iterate all documents with lower - index values. - - For example, if you access the document at ``c[4]``, - :program:`mongo` must load and iterate through the documents at - ``c[0]`` through ``c[3]`` in addition to ``c[4]``. For very large - result sets, :program:`mongo` may run out of available memory. + When you access documents in a cursor using the array index + notation, :program:`mongo` first calls the ``cursor.toArray()`` + method and loads into RAM all documents returned by the cursor. The + index is then applied to the resulting array. This operation + iterates the cursor completely and exhausts the cursor. + + For very large result sets, :program:`mongo` may run out of + available memory. For more information on the cursor, see :ref:`crud-read-cursor`.