@@ -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
@@ -262,12 +262,10 @@ matches on the exact word.
262
262
Case Insensitivity
263
263
~~~~~~~~~~~~~~~~~~
264
264
265
- .. versionchanged:: 3.2
266
-
267
265
The :query:`$text` operator defaults to the case insensitivity of the
268
266
:doc:`text </core/index-text>` index:
269
267
270
- - The :ref:` version 3 text index <text-index-case-insensitivity>` is
268
+ - The version 3 :ref:` text index <text-index-case-insensitivity>` is
271
269
case insensitive for Latin characters with or without diacritics and
272
270
characters from non-Latin alphabets, such as the Cyrillic alphabet.
273
271
See :ref:`text <text-index-case-insensitivity>` index for details.
@@ -311,12 +309,10 @@ Specifying ``$caseSensitive: true`` may impact performance.
311
309
Diacritic Insensitivity
312
310
~~~~~~~~~~~~~~~~~~~~~~~
313
311
314
- .. versionchanged:: 3.2
315
-
316
312
The :query:`$text` operator defaults to the diacritic insensitivity of
317
313
the :doc:`text </core/index-text>` index:
318
314
319
- - The :ref:` version 3 text index <text-index-diacritic-insensitivity>` is
315
+ - The version 3 :ref:` text index <text-index-diacritic-insensitivity>` is
320
316
diacritic insensitive. That is, the index does not distinguish
321
317
between characters that contain diacritical marks and their
322
318
non-marked counterpart, such as ``é``, ``ê``, and ``e``.
@@ -326,11 +322,11 @@ the :doc:`text </core/index-text>` index:
326
322
``$diacriticSensitive`` Option
327
323
``````````````````````````````
328
324
329
- To support diacritic sensitive text search against the version 3
330
- ``text`` index, specify ``$diacriticSensitive: true``.
325
+ To support diacritic sensitive text search against the ``text`` index,
326
+ specify ``$diacriticSensitive: true``.
331
327
332
328
Text searches against earlier versions of the ``text`` index are
333
- inherently diacritic sensitive and cannot be diacritic insensitive. As
329
+ inherently diacritic sensitive and cannot be diacritic insensitive. As
334
330
such, the ``$diacriticSensitive`` option for the :query:`$text`
335
331
operator has no effect with earlier versions of the ``text`` index.
336
332
@@ -351,7 +347,7 @@ Specifying ``$diacriticSensitive: true`` may impact performance.
351
347
352
348
To perform a diacritic sensitive search against an earlier version of
353
349
the ``text`` index, the :query:`$text` operator searches the ``text``
354
- index which is diacritic sensitive.
350
+ index, which is diacritic sensitive.
355
351
356
352
For diacritic sensitive search, if the suffix stem contains the
357
353
diacritic mark or marks, the :query:`$text` operator matches on the
@@ -374,7 +370,7 @@ Examples
374
370
--------
375
371
376
372
The following examples assume a collection ``articles`` that has a
377
- :doc:` version 3 text </core/index-text>` index on the field ``subject``:
373
+ version 3 :doc:` text </core/index-text>` index on the field ``subject``:
378
374
379
375
.. code-block:: javascript
380
376
@@ -537,8 +533,6 @@ languages.
537
533
Case and Diacritic Insensitive Search
538
534
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
539
535
540
- .. versionchanged:: 3.2
541
-
542
536
The :query:`$text` operator defers to the case and diacritic
543
537
insensitivity of the ``text`` index. The version 3 ``text`` index is
544
538
diacritic insensitive and expands its case insensitivity to include the
@@ -563,7 +557,7 @@ documents.
563
557
{ "_id" : 5, "subject" : "Café Con Leche", "author" : "abc", "views" : 200 }
564
558
{ "_id" : 8, "subject" : "Cafe con Leche", "author" : "xyz", "views" : 10 }
565
559
566
- With the previous versions of the ``text`` index, the query would not
560
+ With previous versions of the ``text`` index, the query would not
567
561
match any document.
568
562
569
563
.. seealso::
@@ -578,8 +572,6 @@ match any document.
578
572
Perform Case Sensitive Search
579
573
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
580
574
581
- .. versionchanged:: 3.2
582
-
583
575
To enable case sensitive search, specify ``$caseSensitive: true``.
584
576
Specifying ``$caseSensitive: true`` may impact performance.
585
577
@@ -657,9 +649,7 @@ The query matches the following document:
657
649
Diacritic Sensitive Search
658
650
~~~~~~~~~~~~~~~~~~~~~~~~~~
659
651
660
- .. versionchanged:: 3.2
661
-
662
- To enable diacritic sensitive search against a version 3 :doc:`text
652
+ To enable diacritic sensitive search against a version 3 :doc:`text
663
653
</core/index-text>` index, specify ``$diacriticSensitive: true``.
664
654
Specifying ``$diacriticSensitive: true`` may impact performance.
665
655
@@ -757,7 +747,7 @@ Sort by Text Search Score
757
747
.. include:: /includes/extracts/4.4-changes-projection-sort-meta-list.rst
758
748
759
749
760
- - In MongoDB 4.2 and earlier , to sort by the text score, include the
750
+ - In MongoDB 4.2, to sort by the text score, include the
761
751
**same** :expression:`$meta` expression in **both** the projection
762
752
document and the sort expression. The following
763
753
query searches for the term ``coffee`` and sorts the results by the
0 commit comments