@@ -93,14 +93,14 @@ Definition
93
93
- boolean
94
94
95
95
- Optional. A boolean flag to enable or disable diacritic sensitive search
96
- against :doc:` version 3 text indexes </core/ index-text>`. Defaults to
96
+ against version 3 :ref:` text < index-feature- text>` indexes . Defaults to
97
97
``false``; i.e. the search defers to the diacritic insensitivity of
98
- the :doc:` text </core/index-text> ` index.
99
-
100
- Text searches against earlier versions of the text index are
98
+ the `` text` ` index.
99
+
100
+ Text searches against earlier versions of the `` text`` index are
101
101
inherently diacritic sensitive and cannot be diacritic insensitive.
102
102
As such, the ``$diacriticSensitive`` option has no effect with
103
- earlier versions of the text index.
103
+ earlier versions of the `` text`` index.
104
104
105
105
For more information, see :ref:`text-operator-diacritic-sensitivity`.
106
106
@@ -260,12 +260,10 @@ matches on the exact word.
260
260
Case Insensitivity
261
261
~~~~~~~~~~~~~~~~~~
262
262
263
- .. versionchanged:: 3.2
264
-
265
263
The :query:`$text` operator defaults to the case insensitivity of the
266
264
:doc:`text </core/index-text>` index:
267
265
268
- - The :ref:` version 3 text index <text-index-case-insensitivity>` is
266
+ - The version 3 :ref:` text index <text-index-case-insensitivity>` is
269
267
case insensitive for Latin characters with or without diacritics and
270
268
characters from non-Latin alphabets, such as the Cyrillic alphabet.
271
269
See :ref:`text <text-index-case-insensitivity>` index for details.
@@ -309,12 +307,10 @@ Specifying ``$caseSensitive: true`` may impact performance.
309
307
Diacritic Insensitivity
310
308
~~~~~~~~~~~~~~~~~~~~~~~
311
309
312
- .. versionchanged:: 3.2
313
-
314
310
The :query:`$text` operator defaults to the diacritic insensitivity of
315
311
the :doc:`text </core/index-text>` index:
316
312
317
- - The :ref:` version 3 text index <text-index-diacritic-insensitivity>` is
313
+ - The version 3 :ref:` text index <text-index-diacritic-insensitivity>` is
318
314
diacritic insensitive. That is, the index does not distinguish
319
315
between characters that contain diacritical marks and their
320
316
non-marked counterpart, such as ``é``, ``ê``, and ``e``.
@@ -324,11 +320,11 @@ the :doc:`text </core/index-text>` index:
324
320
``$diacriticSensitive`` Option
325
321
``````````````````````````````
326
322
327
- To support diacritic sensitive text search against the version 3
328
- ``text`` index, specify ``$diacriticSensitive: true``.
323
+ To support diacritic sensitive text search against the ``text`` index,
324
+ specify ``$diacriticSensitive: true``.
329
325
330
326
Text searches against earlier versions of the ``text`` index are
331
- inherently diacritic sensitive and cannot be diacritic insensitive. As
327
+ inherently diacritic sensitive and cannot be diacritic insensitive. As
332
328
such, the ``$diacriticSensitive`` option for the :query:`$text`
333
329
operator has no effect with earlier versions of the ``text`` index.
334
330
@@ -349,7 +345,7 @@ Specifying ``$diacriticSensitive: true`` may impact performance.
349
345
350
346
To perform a diacritic sensitive search against an earlier version of
351
347
the ``text`` index, the :query:`$text` operator searches the ``text``
352
- index which is diacritic sensitive.
348
+ index, which is diacritic sensitive.
353
349
354
350
For diacritic sensitive search, if the suffix stem contains the
355
351
diacritic mark or marks, the :query:`$text` operator matches on the
@@ -372,7 +368,7 @@ Examples
372
368
--------
373
369
374
370
The following examples assume a collection ``articles`` that has a
375
- :doc:` version 3 text </core/index-text>` index on the field ``subject``:
371
+ version 3 :doc:` text </core/index-text>` index on the field ``subject``:
376
372
377
373
.. code-block:: javascript
378
374
@@ -533,8 +529,6 @@ languages.
533
529
Case and Diacritic Insensitive Search
534
530
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
535
531
536
- .. versionchanged:: 3.2
537
-
538
532
The :query:`$text` operator defers to the case and diacritic
539
533
insensitivity of the ``text`` index. The version 3 ``text`` index is
540
534
diacritic insensitive and expands its case insensitivity to include the
@@ -559,7 +553,7 @@ documents.
559
553
{ "_id" : 5, "subject" : "Café Con Leche", "author" : "abc", "views" : 200 }
560
554
{ "_id" : 8, "subject" : "Cafe con Leche", "author" : "xyz", "views" : 10 }
561
555
562
- With the previous versions of the ``text`` index, the query would not
556
+ With previous versions of the ``text`` index, the query would not
563
557
match any document.
564
558
565
559
.. seealso::
@@ -574,8 +568,6 @@ match any document.
574
568
Perform Case Sensitive Search
575
569
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
576
570
577
- .. versionchanged:: 3.2
578
-
579
571
To enable case sensitive search, specify ``$caseSensitive: true``.
580
572
Specifying ``$caseSensitive: true`` may impact performance.
581
573
@@ -653,9 +645,7 @@ The query matches the following document:
653
645
Diacritic Sensitive Search
654
646
~~~~~~~~~~~~~~~~~~~~~~~~~~
655
647
656
- .. versionchanged:: 3.2
657
-
658
- To enable diacritic sensitive search against a version 3 :doc:`text
648
+ To enable diacritic sensitive search against a version 3 :doc:`text
659
649
</core/index-text>` index, specify ``$diacriticSensitive: true``.
660
650
Specifying ``$diacriticSensitive: true`` may impact performance.
661
651
@@ -753,7 +743,7 @@ Sort by Text Search Score
753
743
.. include:: /includes/extracts/4.4-changes-projection-sort-meta-list.rst
754
744
755
745
756
- - In MongoDB 4.2 and earlier , to sort by the text score, include the
746
+ - In MongoDB 4.2, to sort by the text score, include the
757
747
**same** :expression:`$meta` expression in **both** the projection
758
748
document and the sort expression. The following
759
749
query searches for the term ``coffee`` and sorts the results by the
0 commit comments