Skip to content

Commit eda4eda

Browse files
author
Sam Kleinman
committed
DOCS-2179: edit
1 parent 3407c04 commit eda4eda

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

source/reference/operator/meta/natural.txt

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -46,19 +46,20 @@ Use ``-1`` to return documents in the reverse order as they occur on disk:
4646
Natural Order Comparison
4747
~~~~~~~~~~~~~~~~~~~~~~~~
4848

49-
In this scenario:
49+
To demonstrate natural ordering:
5050

51-
- Create an extra index as { normal: 1 }.
51+
- Create an ``{ normal: 1 }`` index on a collection (e.g. ``coll``).
5252

53-
- Insert relevant objects with ``_id`` and ``normal`` values, for example,
54-
a string type object created with:
53+
- Insert relevant objects with ``_id`` and ``normal`` values, for
54+
example, a document with ``_id`` and ``normal`` fields that both
55+
hold the same string:
5556

5657
.. code-block:: javascript
5758

5859
db.coll.insert( { _id: "01", normal: "01" } )
5960

60-
- Use a different type for member values for each distinct object, with the
61-
same values in each object.
61+
- Use values with different types for each document, but both fields
62+
in the document should have the same value:
6263

6364
- Use ``.find().sort().explain()`` for all operations.
6465

@@ -71,10 +72,10 @@ and a description of the :method:`~cursor.explain()` method output:
7172
:header-rows: 2
7273
:widths: 20 25 25 25
7374

74-
* -
75-
-
75+
* -
76+
-
7677
- :method:`~cursor.sort()`
77-
-
78+
-
7879

7980
* - :method:`~db.collection.find()`
8081
- :operator:`$natural`:1

0 commit comments

Comments
 (0)