Skip to content

Commit 0fdabb3

Browse files
authored
1 parent 3d9ca73 commit 0fdabb3

File tree

6 files changed

+25
-59
lines changed

6 files changed

+25
-59
lines changed

source/includes/fact-bson-types.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
* - Decimal128
100100
- 19
101101
- "decimal"
102-
- New in version 3.4.
102+
-
103103

104104
* - Min key
105105
- -1

source/reference/operator/query/not.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ data types like arrays.
5555

5656
:query:`$not` operator can perform logical ``NOT`` operation on:
5757

58-
- regular expression objects (i.e. ``/pattern/``)
58+
- Regular expression objects (i.e. ``/pattern/``)
5959

6060
For example, the following query selects all documents in the
6161
``inventory`` collection where the ``item`` field value does *not*
@@ -65,7 +65,7 @@ data types like arrays.
6565

6666
db.inventory.find( { item: { $not: /^p.*/ } } )
6767

68-
- :query:`$regex` operator expression (Starting in MongoDB 4.0.7)
68+
- :query:`$regex` operator expression
6969

7070
For example, the following query selects all documents in the
7171
``inventory`` collection where the ``item`` field value does *not*

source/reference/operator/query/regex.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,18 +181,18 @@ field strings that match the regular expression ``"(?i)a(?-i)cme"``:
181181
``$regex`` and ``$not``
182182
```````````````````````
183183

184-
Starting in 4.0.7, :query:`$not` operator can perform logical ``NOT``
184+
The :query:`$not` operator can perform logical ``NOT``
185185
operation on both:
186186

187-
- regular expression objects (i.e. ``/pattern/``)
187+
- Regular expression objects (i.e. ``/pattern/``)
188188

189189
For example:
190190

191191
.. code-block:: javascript
192192

193193
db.inventory.find( { item: { $not: /^p.*/ } } )
194194

195-
- :query:`$regex` operator expressions (starting in MongoDB 4.0.7).
195+
- :query:`$regex` operator expressions
196196

197197
For example:
198198

source/reference/operator/query/text.txt

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -95,14 +95,14 @@ Definition
9595
- boolean
9696

9797
- Optional. A boolean flag to enable or disable diacritic sensitive search
98-
against :doc:`version 3 text indexes </core/index-text>`. Defaults to
98+
against version 3 :ref:`text <index-feature-text>` indexes. Defaults to
9999
``false``; i.e. the search defers to the diacritic insensitivity of
100-
the :doc:`text </core/index-text>` index.
101-
102-
Text searches against earlier versions of the text index are
100+
the ``text`` index.
101+
102+
Text searches against earlier versions of the ``text`` index are
103103
inherently diacritic sensitive and cannot be diacritic insensitive.
104104
As such, the ``$diacriticSensitive`` option has no effect with
105-
earlier versions of the text index.
105+
earlier versions of the ``text`` index.
106106

107107
For more information, see :ref:`text-operator-diacritic-sensitivity`.
108108

@@ -255,12 +255,10 @@ matches on the exact word.
255255
Case Insensitivity
256256
~~~~~~~~~~~~~~~~~~
257257

258-
.. versionchanged:: 3.2
259-
260258
The :query:`$text` operator defaults to the case insensitivity of the
261259
:doc:`text </core/index-text>` index:
262260

263-
- The :ref:`version 3 text index <text-index-case-insensitivity>` is
261+
- The version 3 :ref:`text index <text-index-case-insensitivity>` is
264262
case insensitive for Latin characters with or without diacritics and
265263
characters from non-Latin alphabets, such as the Cyrillic alphabet.
266264
See :ref:`text <text-index-case-insensitivity>` index for details.
@@ -303,12 +301,10 @@ Specifying ``$caseSensitive: true`` may impact performance.
303301
Diacritic Insensitivity
304302
~~~~~~~~~~~~~~~~~~~~~~~
305303

306-
.. versionchanged:: 3.2
307-
308304
The :query:`$text` operator defaults to the diacritic insensitivity of
309305
the :doc:`text </core/index-text>` index:
310306

311-
- The :ref:`version 3 text index <text-index-diacritic-insensitivity>` is
307+
- The version 3 :ref:`text index <text-index-diacritic-insensitivity>` is
312308
diacritic insensitive. That is, the index does not distinguish
313309
between characters that contain diacritical marks and their
314310
non-marked counterpart, such as ``é``, ``ê``, and ``e``.
@@ -318,11 +314,11 @@ the :doc:`text </core/index-text>` index:
318314
``$diacriticSensitive`` Option
319315
``````````````````````````````
320316

321-
To support diacritic sensitive text search against the version 3
322-
``text`` index, specify ``$diacriticSensitive: true``.
317+
To support diacritic sensitive text search against the ``text`` index,
318+
specify ``$diacriticSensitive: true``.
323319

324320
Text searches against earlier versions of the ``text`` index are
325-
inherently diacritic sensitive and cannot be diacritic insensitive. As
321+
inherently diacritic sensitive and cannot be diacritic insensitive. As
326322
such, the ``$diacriticSensitive`` option for the :query:`$text`
327323
operator has no effect with earlier versions of the ``text`` index.
328324

@@ -343,7 +339,7 @@ Specifying ``$diacriticSensitive: true`` may impact performance.
343339

344340
To perform a diacritic sensitive search against an earlier version of
345341
the ``text`` index, the :query:`$text` operator searches the ``text``
346-
index which is diacritic sensitive.
342+
index, which is diacritic sensitive.
347343

348344
For diacritic sensitive search, if the suffix stem contains the
349345
diacritic mark or marks, the :query:`$text` operator matches on the
@@ -365,7 +361,7 @@ Examples
365361
--------
366362

367363
The following examples assume a collection ``articles`` that has a
368-
:doc:`version 3 text </core/index-text>` index on the field ``subject``:
364+
version 3 :doc:`text </core/index-text>` index on the field ``subject``:
369365

370366
.. code-block:: javascript
371367

@@ -539,8 +535,6 @@ languages.
539535
Case and Diacritic Insensitive Search
540536
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
541537

542-
.. versionchanged:: 3.2
543-
544538
The :query:`$text` operator defers to the case and diacritic
545539
insensitivity of the ``text`` index. The version 3 ``text`` index is
546540
diacritic insensitive and expands its case insensitivity to include the
@@ -584,7 +578,7 @@ Insensitivity <text-index-diacritic-insensitivity>`.
584578
{ "_id" : 5, "subject" : "Café Con Leche", "author" : "abc", "views" : 200 }
585579
{ "_id" : 8, "subject" : "Cafe con Leche", "author" : "xyz", "views" : 10 }
586580

587-
With the previous versions of the ``text`` index, the query would not
581+
With previous versions of the ``text`` index, the query would not
588582
match any document.
589583

590584
.. seealso::
@@ -598,8 +592,6 @@ match any document.
598592
Perform Case Sensitive Search
599593
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
600594

601-
.. versionchanged:: 3.2
602-
603595
To enable case sensitive search, specify ``$caseSensitive: true``.
604596
Specifying ``$caseSensitive: true`` may impact performance.
605597

@@ -674,9 +666,7 @@ The query matches the following document:
674666
Diacritic Sensitive Search
675667
~~~~~~~~~~~~~~~~~~~~~~~~~~
676668

677-
.. versionchanged:: 3.2
678-
679-
To enable diacritic sensitive search against a version 3 :doc:`text
669+
To enable diacritic sensitive search against a version 3 :doc:`text
680670
</core/index-text>` index, specify ``$diacriticSensitive: true``.
681671
Specifying ``$diacriticSensitive: true`` may impact performance.
682672

@@ -768,7 +758,7 @@ and sorts the results by the descending score:
768758
{ $text: { $search: "coffee" } },
769759
{ score: { $meta: "textScore" } }
770760
).sort( { score: { $meta: "textScore" } } )
771-
761+
772762
The query returns the matching documents sorted by descending score.
773763

774764
.. seealso:: :ref:`text-operator-text-score`

source/reference/operator/query/type.txt

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ Definition
2323
A :query:`$type` expression for a single :term:`BSON` type has
2424
the following syntax:
2525

26-
.. versionchanged:: 3.2
27-
2826
.. code-block:: javascript
2927

3028
{ field: { $type: <BSON type> } }
@@ -68,33 +66,17 @@ For documents where ``field`` is an array, :query:`$type` returns
6866
documents in which at least one array element matches a type passed to
6967
:query:`$type`.
7068

71-
Querying for the Array BSON Type
72-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
73-
74-
With MongoDB 3.6 and later, querying for ``$type: "array"`` returns
75-
documents where the field itself is an array. Prior to MongoDB 3.6,
76-
``$type: "array"`` returned documents where the field is an array
77-
containing at least one element of type ``array``. For example, given
78-
the following documents:
79-
80-
.. code-block:: javascript
81-
82-
{ "data" : [ "values", [ "values" ] ] }
83-
{ "data" : [ "values" ] }
84-
85-
With MongoDB 3.6 and later, the query
86-
``find( {"data" : { $type : "array" } } )`` returns both documents.
87-
Prior to MongoDB 3.6, the query returns only the first document.
69+
Queries for ``$type: "array"`` return documents where the field itself is
70+
an array.
8871

8972
.. _document-type-available-types:
9073

9174
Available Types
9275
~~~~~~~~~~~~~~~
9376

94-
Starting in MongoDB 3.2, :query:`$type` operator accepts string aliases
77+
The :query:`$type` operator accepts string aliases
9578
for the BSON types in addition to the numbers corresponding to the BSON
96-
types. Previous versions only accepted the numbers corresponding to the
97-
BSON type. [#type0]_
79+
types. [#type0]_
9880

9981
.. include:: /includes/fact-bson-types.rst
10082

source/reference/operator/update/position.txt

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,6 @@ Definition
3535
}
3636
}
3737

38-
.. versionchanged:: 3.6
39-
40-
:update:`$position` can accept a negative array index value to
41-
indicate the position starting from the end, counting from (but
42-
not including) the last element of the array.
43-
4438
``<num>`` indicates the position in the array, based on a zero-based index:
4539

4640
- A non-negative number corresponds to the position in the array,

0 commit comments

Comments
 (0)