Skip to content

Commit db6f952

Browse files
committed
DOCS-11920: \$text and \$elemMatch restriction
1 parent 8695e48 commit db6f952

File tree

4 files changed

+16
-3
lines changed

4 files changed

+16
-3
lines changed

source/reference/operator/projection/elemMatch.txt

+3
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ Usage Considerations
2828

2929
.. include:: /includes/extracts/views-unsupported-projection-$elemMatch.rst
3030

31+
- You cannot specify a :query:`$text` query expression in an
32+
:projection:`$elemMatch`.
33+
3134
Examples
3235
--------
3336

source/reference/operator/query/elemMatch.txt

+5-2
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,11 @@ Definition
3434
Behavior
3535
--------
3636

37-
You cannot specify a :query:`$where` expression as a query criterion
38-
for :query:`$elemMatch`.
37+
- You cannot specify a :query:`$where` expression in an
38+
:query:`$elemMatch`.
39+
40+
- You cannot specify a :query:`$text` query expression in an
41+
:query:`$elemMatch`.
3942

4043
Examples
4144
--------

source/reference/operator/query/text.txt

+3
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ Restrictions
5858

5959
- The :query:`$text` query can not appear in :query:`$nor` expressions.
6060

61+
- The :query:`$text` query can not appear in :query:`$elemMatch` query
62+
expressions or :projection:`$elemMatch` projection expressions.
63+
6164
- To use a :query:`$text` query in an :query:`$or` expression, all
6265
clauses in the :query:`$or` array must be indexed.
6366

source/tutorial/text-search-in-aggregation.txt

+5-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ the :query:`$text` query operator in the :pipeline:`$match` stage.
2020
Restrictions
2121
~~~~~~~~~~~~
2222

23-
Text search in the aggregation pipeline has the following restrictions:
23+
For general :query:`$text` operator restrictions, see :ref:`operator
24+
restrictions <text-query-operator-behavior>`.
25+
26+
In addition, text search in the aggregation pipeline has the following
27+
restrictions:
2428

2529
.. include:: /includes/list-text-search-restrictions-in-agg.rst
2630

0 commit comments

Comments
 (0)