@@ -8,11 +8,11 @@ cursor.min()
88
99 The :method:`min() <cursor.min()>` method specifies the *inclusive*
1010 lower bound for a specific index in order to constrain the results
11- of the :method:`find() <db.collection.find()>` method. The
12- :method:`min() <cursor.min()>` method provides a way to specify
13- lower bounds on compound key indexes.
11+ of :method:`find() <db.collection.find()>`. :method:`min()
12+ <cursor.min()>` provides a way to specify lower bounds on compound
13+ key indexes.
1414
15- The :method:`min() <cursor.min()>` method takes the following parameter:
15+ :method:`min() <cursor.min()>` takes the following parameter:
1616
1717 :param document indexbounds:
1818
@@ -31,8 +31,7 @@ cursor.min()
3131 fields with different sort orders, the selection of the index
3232 may be ambiguous.
3333
34- Consider the following examples of the :method:`min() <cursor.min()>`
35- method:
34+ Consider the following examples of :method:`min() <cursor.min()>`:
3635
3736 The examples assume a collection ``products`` with the following documents:
3837
@@ -58,10 +57,10 @@ cursor.min()
5857 { "item" : 1, "type" : -1 }
5958 { "price" : 1 }
6059
61- - Using the ordering of ``{ item: 1, type: 1 }`` index, the
62- :method:`min() <cursor.min()>` method limits the query to the
63- documents that are at or above the index key bound of ``item``
64- equal to ``apple`` and ``type`` equal to ``jonagold``:
60+ - Using the ordering of ``{ item: 1, type: 1 }`` index,
61+ :method:`min() <cursor.min()>` limits the query to the documents
62+ that are at or above the index key bound of ``item`` equal to
63+ ``apple`` and ``type`` equal to ``jonagold``:
6564
6665 .. code-block:: javascript
6766
@@ -85,12 +84,11 @@ cursor.min()
8584 whether :program:`mongod` would select the ``{ item: 1, type: 1
8685 }`` index ordering or the ``{ item: 1, type: -1 }`` index ordering.
8786
88- - Using the ordering of the index ``{ price: 1 }``, the :method:`min()
89- <cursor.min()>` method limits the query to the documents that are
90- at or above the index key bound of ``price`` equal to ``1.39`` and
91- the :method:`max() <cursor.max()>` method limits the query to the
92- documents that are below the index key bound of ``price`` equal to
93- ``1.99``:
87+ - Using the ordering of the index ``{ price: 1 }``, :method:`min()
88+ <cursor.min()>` limits the query to the documents that are at or
89+ above the index key bound of ``price`` equal to ``1.39`` and
90+ :method:`max() <cursor.max()>` limits the query to the documents
91+ that are below the index key bound of ``price`` equal to ``1.99``:
9492
9593 .. code-block:: javascript
9694
@@ -108,10 +106,10 @@ cursor.min()
108106
109107 .. note::
110108
111- - Because the :method:`min() <cursor.min()>` method requires a
112- corresponding index as well as enforces the use of that index,
113- it may be preferable to use the :operator:`$gte` operator in
114- the query if possible. Consider the following example:
109+ - Because :method:`min() <cursor.min()>` requires a corresponding
110+ index as well as enforces the use of that index, it may be
111+ preferable to use the :operator:`$gte` operator in the query if
112+ possible. Consider the following example:
115113
116114 .. code-block:: javascript
117115
@@ -120,14 +118,13 @@ cursor.min()
120118 The query will use the index on the ``price`` field, even if
121119 the index on ``_id`` may be better.
122120
123- - The :method:`min() <cursor.min()>` method exists primarily to
124- support the :program:`mongos` (sharding) process.
121+ - :method:`min() <cursor.min()>` exists primarily to support the
122+ :program:`mongos` (sharding) process.
125123
126- - If you use :method:`min() <cursor.min()>` method with the
127- :method:`max() <cursor.max()>` method to specify a range, the
128- index bounds specified in :method:`min() <cursor.min()>` method
129- and the :method:`max() <cursor.max()>` method must both refer
130- to the keys of the same index.
124+ - If you use :method:`min() <cursor.min()>` with :method:`max()
125+ <cursor.max()>` to specify a range, the index bounds specified
126+ in :method:`min() <cursor.min()>` and :method:`max()
127+ <cursor.max()>` must both refer to the keys of the same index.
131128
132- - The :method:`min() <cursor.min()>` method is a shell wrapper
133- around the special operator :operator:`$min`.
129+ - :method:`min() <cursor.min()>` is a shell wrapper around the
130+ special operator :operator:`$min`.
0 commit comments