Skip to content

Commit 2fdf33b

Browse files
mungitoperritojeff-allen-mongo
authored andcommitted
DOCSP-19350 remove deprecated query modifiers
1 parent 61e7b6e commit 2fdf33b

26 files changed

+116
-1061
lines changed

config/redirects

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1892,7 +1892,17 @@ raw: /manual/core/wildcard -> ${base}/manual/core/index-wildcard/
18921892
#
18931893

18941894
[v5.0-*]: /${version}/core/core/authentication-mechanisms -> ${base}/${version}/core/authentication
1895-
1895+
[v5.1-*]: /${version}/reference/operator/meta/comment -> ${base}/${version}/reference/method/js-cursor/
1896+
[v5.1-*]: /${version}/reference/operator/meta/explain -> ${base}/${version}/reference/method/js-cursor/
1897+
[v5.1-*]: /${version}/reference/operator/meta/hint -> ${base}/${version}/reference/method/js-cursor/
1898+
[v5.1-*]: /${version}/reference/operator/meta/max -> ${base}/${version}/reference/method/js-cursor/
1899+
[v5.1-*]: /${version}/reference/operator/meta/maxTimeMS -> ${base}/${version}/reference/method/js-cursor/
1900+
[v5.1-*]: /${version}/reference/operator/meta/meta/min -> ${base}/${version}/reference/method/js-cursor/
1901+
[v5.1-*]: /${version}/reference/operator/meta/meta/orderby -> ${base}/${version}/reference/method/js-cursor/
1902+
[v5.1-*]: /${version}/reference/operator/meta/meta/query -> ${base}/${version}/reference/method/js-cursor/
1903+
[v5.1-*]: /${version}/reference/operator/meta/meta/returnKey -> ${base}/${version}/reference/method/js-cursor/
1904+
[v5.1-*]: /${version}/reference/operator/meta/meta/showDiskLoc -> ${base}/${version}/reference/method/js-cursor/
1905+
[v5.1-*]: /${version}/reference/operator/query-modifier -> ${base}/${version}/reference/method/js-cursor/
18961906

18971907
#
18981908
# Upgrade / Downgrade redirects

source/includes/extracts-mongo-shell-deprecated-meta-operator.yaml

Lines changed: 0 additions & 122 deletions
This file was deleted.

source/includes/fact-query-min-max.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
The :operator:`$min` and :operator:`$max` operators indicate that the system
2-
should avoid normal query planning. Instead they construct an index scan where
3-
the index bounds are explicitly specified by the values given in
4-
:operator:`$min` and :operator:`$max`.
1+
The :method:`~cursor.min()` and :method:`~cursor.max()` methods
2+
indicate that the system should avoid normal query planning. They
3+
construct an index scan where the index bounds are explicitly specified
4+
by the values given in :method:`~cursor.min()` and
5+
:method:`~cursor.max()`.
56

67
.. warning::
78

source/reference/indexes.txt

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -151,38 +151,4 @@ Geospatial Query Selectors
151151
Requires a geospatial index. The :doc:`2dsphere
152152
</core/2dsphere>` and :doc:`2d </core/2d>` indexes support
153153
:query:`$nearSphere`.
154-
155-
156-
157-
Indexing Query Modifiers
158-
------------------------
159-
160-
.. list-table::
161-
:widths: 30,70
162-
:header-rows: 1
163-
164-
* - Name
165-
166-
- Description
167-
168-
* - :operator:`$explain`
169-
170-
- Forces MongoDB to report on query execution plans. See :method:`~cursor.explain()`.
171-
172-
* - :operator:`$hint`
173-
174-
- Forces MongoDB to use a specific index. See :method:`~cursor.hint()`
175-
176-
* - :operator:`$max`
177-
178-
- Specifies an *exclusive* upper limit for the index to use in a query. See :method:`~cursor.max()`.
179-
180-
* - :operator:`$min`
181-
182-
- Specifies an *inclusive* lower limit for the index to use in a query. See :method:`~cursor.min()`.
183-
184-
* - :operator:`$returnKey`
185-
186-
- Forces the cursor to only return fields included in the index.
187-
188154

source/reference/method/cursor.addOption.txt

Lines changed: 9 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,39 +15,30 @@ Definition
1515

1616
.. method:: cursor.addOption(flag)
1717

18-
1918
.. include:: /includes/fact-mongosh-shell-method.rst
2019

20+
.. note:: Deprecated since v3.2
2121

22-
.. include:: /includes/extracts/mongo-shell-deprecated-meta-operator-cursor-addOption.rst
22+
Starting in v3.2, the :method:`cursor.addOption()` operator is
23+
deprecated in :binary:`~bin.mongo`. Use available :doc:`cursor
24+
methods </reference/method/js-cursor>` instead.
2325

24-
Adds ``OP_QUERY`` wire protocol flags, such as the ``tailable``
25-
flag, to change the behavior of queries.
26+
Used to change query behavior by setting the flags listed below.
2627

2728
The :method:`cursor.addOption()` method has the following parameter:
2829

29-
3030
.. list-table::
3131
:header-rows: 1
3232
:widths: 20 20 80
3333

3434
* - Parameter
35-
3635
- Type
37-
3836
- Description
39-
4037
* - ``flag``
41-
4238
- flag
43-
44-
- ``OP_QUERY`` wire protocol flag. For :binary:`~bin.mongosh`,
45-
you can use the cursor flags listed below. For the driver-specific
46-
list, see your :driver:`driver documentation </>`.
47-
48-
49-
50-
39+
- For :binary:`~bin.mongosh`, you can use the cursor flags
40+
listed below. For the driver-specific list, see your
41+
:driver:`driver documentation </>`.
5142

5243
.. _cursor-flags:
5344

@@ -63,28 +54,22 @@ modify the behavior of the cursor.
6354

6455
* - Flag
6556
- Description
66-
6757
* - .. data:: DBQuery.Option.tailable
6858
- Sets the cursor not to close once the last data is
6959
received, allowing the query to continue returning data added
7060
after the initial results were exhausted.
71-
7261
* - .. data:: DBQuery.Option.slaveOk
73-
- Allows querying of a replica slave.
74-
62+
- Allows querying of a replica secondary.
7563
* - .. data:: DBQuery.Option.noTimeout
7664
- Prevents the server from timing out idle cursors.
77-
7865
* - .. data:: DBQuery.Option.awaitData
7966
- For use with .. data:: DBQuery.Option.tailable; sets the cursor
8067
to block and await data for a while rather than returning no
8168
data. The cursor will return no data once the timeout has
8269
expired.
83-
8470
* - .. data:: DBQuery.Option.exhaust
8571
- Sets the cursor to return all data returned by the
8672
query at once rather than splitting the results into batches.
87-
8873
* - .. data:: DBQuery.Option.partial
8974
- Sets the cursor to return partial data from a query against a
9075
sharded cluster in which some shards do not respond rather than

source/reference/method/cursor.hint.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,4 @@ reverse collection scan:
111111
- :doc:`/indexes`
112112
- :doc:`/core/query-plans`
113113
- :ref:`index-filters`
114-
- :operator:`$hint`
114+

source/reference/method/cursor.max.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,10 +79,7 @@ order*.
7979
:method:`~cursor.min()`
8080

8181
:method:`~cursor.max()` exists primarily to support the
82-
:binary:`~bin.mongos` (sharding) process, and is a shell wrapper around
83-
the query modifier :operator:`$max`.
84-
85-
.. include:: /includes/extracts/mongo-shell-deprecated-meta-operator-max.rst
82+
:binary:`~bin.mongos` (sharding) process.
8683

8784
Behavior
8885
--------

source/reference/method/cursor.min.txt

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,7 @@ Definition
7373
:method:`~cursor.max()`
7474

7575
:method:`~cursor.min()` exists primarily to support the
76-
:binary:`~bin.mongos` process, and is a shell wrapper around the
77-
query modifier :operator:`$min`.
78-
79-
.. include:: /includes/extracts/mongo-shell-deprecated-meta-operator-min.rst
76+
:binary:`~bin.mongos` process.
8077

8178
Behaviors
8279
---------

0 commit comments

Comments
 (0)