@@ -95,14 +95,14 @@ Definition
95
95
- boolean
96
96
97
97
- 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
99
99
``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
103
103
inherently diacritic sensitive and cannot be diacritic insensitive.
104
104
As such, the ``$diacriticSensitive`` option has no effect with
105
- earlier versions of the text index.
105
+ earlier versions of the `` text`` index.
106
106
107
107
For more information, see :ref:`text-operator-diacritic-sensitivity`.
108
108
@@ -264,12 +264,10 @@ matches on the exact word.
264
264
Case Insensitivity
265
265
~~~~~~~~~~~~~~~~~~
266
266
267
- .. versionchanged:: 3.2
268
-
269
267
The :query:`$text` operator defaults to the case insensitivity of the
270
268
:doc:`text </core/index-text>` index:
271
269
272
- - The :ref:` version 3 text index <text-index-case-insensitivity>` is
270
+ - The version 3 :ref:` text index <text-index-case-insensitivity>` is
273
271
case insensitive for Latin characters with or without diacritics and
274
272
characters from non-Latin alphabets, such as the Cyrillic alphabet.
275
273
See :ref:`text <text-index-case-insensitivity>` index for details.
@@ -313,12 +311,10 @@ Specifying ``$caseSensitive: true`` may impact performance.
313
311
Diacritic Insensitivity
314
312
~~~~~~~~~~~~~~~~~~~~~~~
315
313
316
- .. versionchanged:: 3.2
317
-
318
314
The :query:`$text` operator defaults to the diacritic insensitivity of
319
315
the :doc:`text </core/index-text>` index:
320
316
321
- - The :ref:` version 3 text index <text-index-diacritic-insensitivity>` is
317
+ - The version 3 :ref:` text index <text-index-diacritic-insensitivity>` is
322
318
diacritic insensitive. That is, the index does not distinguish
323
319
between characters that contain diacritical marks and their
324
320
non-marked counterpart, such as ``é``, ``ê``, and ``e``.
@@ -328,11 +324,11 @@ the :doc:`text </core/index-text>` index:
328
324
``$diacriticSensitive`` Option
329
325
``````````````````````````````
330
326
331
- To support diacritic sensitive text search against the version 3
332
- ``text`` index, specify ``$diacriticSensitive: true``.
327
+ To support diacritic sensitive text search against the ``text`` index,
328
+ specify ``$diacriticSensitive: true``.
333
329
334
330
Text searches against earlier versions of the ``text`` index are
335
- inherently diacritic sensitive and cannot be diacritic insensitive. As
331
+ inherently diacritic sensitive and cannot be diacritic insensitive. As
336
332
such, the ``$diacriticSensitive`` option for the :query:`$text`
337
333
operator has no effect with earlier versions of the ``text`` index.
338
334
@@ -353,7 +349,7 @@ Specifying ``$diacriticSensitive: true`` may impact performance.
353
349
354
350
To perform a diacritic sensitive search against an earlier version of
355
351
the ``text`` index, the :query:`$text` operator searches the ``text``
356
- index which is diacritic sensitive.
352
+ index, which is diacritic sensitive.
357
353
358
354
For diacritic sensitive search, if the suffix stem contains the
359
355
diacritic mark or marks, the :query:`$text` operator matches on the
@@ -376,7 +372,7 @@ Examples
376
372
--------
377
373
378
374
The following examples assume a collection ``articles`` that has a
379
- :doc:` version 3 text </core/index-text>` index on the field ``subject``:
375
+ version 3 :doc:` text </core/index-text>` index on the field ``subject``:
380
376
381
377
.. code-block:: javascript
382
378
@@ -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