Skip to content

Commit 1508a93

Browse files
DOCSP-17660 query document phrase (#143)
* changes all occurrences of query document to query filter
1 parent b057374 commit 1508a93

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

source/fundamentals/builders/projections.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,8 +256,8 @@ the first element of an array. Only documents that match the query filter will b
256256

257257
.. warning::
258258

259-
In MongoDB versions < 4.4, the specified array field must appear in the query document. Beginning in MongoDB 4.4,
260-
you can use a positional project on an array field that does not appear in the query document.
259+
In MongoDB versions < 4.4, the specified array field must appear in the query filter. Beginning in MongoDB 4.4,
260+
you can use a positional project on an array field that does not appear in the query filter.
261261

262262

263263
The following example projects the first element of the ``temperatures`` array:

source/fundamentals/crud/compound-operations.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ The example also uses a ``FindOneAndUpdateOptions`` instance to specify the
8282
following options:
8383

8484
- Exclude the ``_id`` field from the found document with a projection.
85-
- Specify an upsert, which inserts the query document if no documents match the query.
85+
- Specify an upsert, which inserts the document specified by the query filter if no documents match the query.
8686
- Set a maximum execution time of 5 seconds for this operation on the MongoDB
8787
instance. If the operation takes longer, the ``findOneAndUpdate()`` method
8888
will throw a ``MongoExecutionTimeoutException``.

source/fundamentals/crud/query-document.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ In this guide, you can learn how to specify a query in the MongoDB Java
1717
driver.
1818

1919
Most CRUD operations allow you to narrow the set of matched documents by
20-
specifying matching criteria in a **query document**. Query documents
20+
specifying matching criteria in a **query filter**. Query filters
2121
contain one or more query operators that apply to specific fields which
2222
determine which documents to include in the result set.
2323

source/fundamentals/crud/read-operations/project.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ field of each document:
7575
The projection document specifies that the read operation result should
7676
*include* the ``name`` field of each returned document. As a result, this
7777
projection implicitly excludes the ``qty`` and ``rating`` fields. Chaining
78-
this projection to ``find()`` with an empty query document yields the
78+
this projection to ``find()`` with an empty query filter yields the
7979
following results:
8080

8181
.. code-block:: json
@@ -115,7 +115,7 @@ The projection document specifies that the read operation result should
115115
*include* the ``name`` field of each returned document, and specifies to
116116
*exclude* the ``_id`` field. As a result, this projection implicitly
117117
excludes the ``qty`` and ``rating`` fields. Chaining this projection to
118-
``find()`` with an empty query document yields the following results:
118+
``find()`` with an empty query filter yields the following results:
119119

120120
.. code-block:: javascript
121121
:copyable: false

source/fundamentals/crud/write-operations/embedded-arrays.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ arrays, see our :ref:`guide on the Updates builder <array_updates>`.
5050
The following example performs these actions:
5151

5252
- Query for the sample document
53-
- Add "17" to the ``qty`` array using the ``push()`` method of the ``Updates`` builder
53+
- Append "17" to the ``qty`` array in the document that matches the query filter
5454

5555
.. literalinclude:: /includes/fundamentals/code-snippets/UpdateArray.java
5656
:language: java
@@ -84,15 +84,15 @@ The First Matching Array Element
8484

8585
To update the first array element that matches your query filter, use the
8686
positional ``$`` operator. The array field must appear as part of your
87-
query document to use the positional ``$`` operator.
87+
query filter to use the positional ``$`` operator.
8888

8989
Example
9090
```````
9191

9292
The following example performs these actions:
9393

9494
- Query for a document with a ``qty`` field containing the value "18"
95-
- Decrement the first array value that matches the query document by "3" using the ``inc()`` method of the ``Updates`` builder and the positional ``$`` operator
95+
- Decrement the first array value in the document that matches the query filter by "3"
9696

9797
.. literalinclude:: /includes/fundamentals/code-snippets/UpdateArray.java
9898
:language: java
@@ -124,7 +124,7 @@ Example
124124
The following example performs these actions:
125125

126126
- Query for the sample document
127-
- Multiply array elements matching the filter by "2" using the ``mul()`` method of the ``Updates`` builder and the all positional ``$[]`` operator
127+
- Multiply array elements matching the query filter by "2"
128128

129129
.. literalinclude:: /includes/fundamentals/code-snippets/UpdateArray.java
130130
:language: java
@@ -164,7 +164,7 @@ The following example performs these actions:
164164

165165
- Query for the sample document
166166
- Set an array filter to search for values less than "15"
167-
- Increment array elements matching the filter by "5" using the ``inc()`` method of the ``Updates`` builder and the filtered positional operator
167+
- Increment array elements matching the query filter by "5"
168168

169169
.. literalinclude:: /includes/fundamentals/code-snippets/UpdateArray.java
170170
:language: java

source/usage-examples/count.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ There are two instance methods in the ``MongoCollection`` class that you can
88
call to count the number of documents in a collection:
99

1010
- ``countDocuments()`` returns the number of documents in the collection
11-
that match a specified query. If you specify an empty query document,
11+
that match a specified query. If you specify an empty query filter,
1212
the method returns the total number of documents in the collection.
1313

1414
- ``estimatedDocumentCount()`` returns an **estimation** of the number of

source/usage-examples/distinct.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Example
4040
-------
4141

4242
The following snippet retrieves a list of distinct values for the ``year``
43-
document field from the ``movies`` collection. It uses a query document to
43+
document field from the ``movies`` collection. It uses a query filter to
4444
match movies that include "Carl Franklin" as one of the values in the
4545
``directors`` array.
4646

0 commit comments

Comments
 (0)