@@ -64,6 +64,12 @@ Equality Filter
6464 contain the ``item`` field whose value is ``null`` *or* that
6565 do not contain the ``item`` field.
6666
67+ - id: compass
68+ content: |
69+ The ``{ item : null }`` query matches documents that either
70+ contain the ``item`` field whose value is ``null`` *or* that
71+ do not contain the ``item`` field.
72+
6773 - id: python
6874 content: |
6975 The ``{ item : None }`` query matches documents that either
@@ -119,10 +125,10 @@ Equality Filter
119125 matches documents that either contain the ``item`` field whose
120126 value is ``null`` *or* that do not contain the ``item`` field.
121127
122- For example, the following query returns both documents:
123-
124128.. include:: /includes/driver-example-query-39.rst
125129
130+ The query returns both documents in the collection.
131+
126132Type Check
127133----------
128134
@@ -131,79 +137,98 @@ Type Check
131137 tabs:
132138 - id: shell
133139 content: |
134- The ``{ item : { $type: 10 } }`` query matches documents that
135- contains the ``item`` field whose value is ``null`` *only*;
136- i.e. the value of the ``item`` field is of BSON Type ``Null``
137- (i.e. ``10``) :
140+ The ``{ item : { $type: 10 } }`` query matches *only*
141+ documents that contain the ``item`` field whose value is
142+ ``null``; i.e. the value of the ``item`` field is of
143+ :doc:`BSON Type </reference/bson-types>` ``Null``
144+ (type number ``10``) :
145+
146+ - id: compass
147+ content: |
148+ The ``{ item : { $type: 10 } }`` query matches *only*
149+ documents that contain the ``item`` field whose value is
150+ ``null``; i.e. the value of the ``item`` field is of
151+ :doc:`BSON Type </reference/bson-types>` ``Null``
152+ (type number ``10``) :
138153
139154 - id: python
140155 content: |
141- The ``{ item : { $type: 10 } }`` query matches documents that
142- contains the ``item`` field whose value is ``null`` *only*;
143- i.e. the value of the ``item`` field is of BSON Type ``Null``
144- (i.e. ``10``) :
156+ The ``{ item : { $type: 10 } }`` query matches *only*
157+ documents that contain the ``item`` field whose value is
158+ ``null``; i.e. the value of the ``item`` field is of
159+ :doc:`BSON Type </reference/bson-types>` ``Null``
160+ (type number ``10``) :
145161
146162 - id: java-sync
147163 content: |
148- The ``type("item", BsonType.NULL)`` query matches documents
149- that contains the ``item`` field whose value is ``null``
150- *only*; i.e. the value of the ``item`` field is of BSON Type
151- ``Null`` (i.e. ``10``) :
164+ The ``type("item", BsonType.NULL)`` query matches *only*
165+ documents that contain the ``item`` field whose value is
166+ ``null``; i.e. the value of the ``item`` field is of
167+ :doc:`BSON Type </reference/bson-types>` ``Null``
168+ (type number ``10``) :
152169
153170 - id: java-async
154171 content: |
155- The ``type("item", BsonType.NULL)`` query matches documents
156- that contains the ``item`` field whose value is ``null``
157- *only*; i.e. the value of the ``item`` field is of BSON Type
158- ``Null`` (i.e. ``10``) :
172+ The ``type("item", BsonType.NULL)`` query matches *only*
173+ documents that contain the ``item`` field whose value is
174+ ``null``; i.e. the value of the ``item`` field is of
175+ :doc:`BSON Type </reference/bson-types>` ``Null``
176+ (type number ``10``) :
159177
160178 - id: nodejs
161179 content: |
162- The ``{ item : { $type: 10 } }`` query matches documents that
163- contains the ``item`` field whose value is ``null`` *only*;
164- i.e. the value of the ``item`` field is of BSON Type ``Null``
165- (i.e. ``10``) :
180+ The ``{ item : { $type: 10 } }`` query matches *only*
181+ documents that contain the ``item`` field whose value is
182+ ``null``; i.e. the value of the ``item`` field is of
183+ :doc:`BSON Type </reference/bson-types>` ``Null``
184+ (type number ``10``) :
166185
167186 - id: php
168187 content: |
169- The ``[ item => [ $type => 10 ] ]`` query matches documents that
170- contains the ``item`` field whose value is ``null`` *only*;
171- i.e. the value of the ``item`` field is of BSON Type ``Null``
172- (i.e. ``10``) :
188+ The ``[ item => [ $type => 10 ] ]`` query matches *only*
189+ documents that contain the ``item`` field whose value is
190+ ``null``; i.e. the value of the ``item`` field is of
191+ :doc:`BSON Type </reference/bson-types>` ``Null``
192+ (type number ``10``) :
173193
174194 - id: perl
175195 content: |
176- The ``{ item => { $type => 10 } }`` query matches documents that
177- contains the ``item`` field whose value is ``null`` *only*;
178- i.e. the value of the ``item`` field is of BSON Type ``Null``
179- (i.e. ``10``) :
196+ The ``{ item => { $type => 10 } }`` query matches *only*
197+ documents that contain the ``item`` field whose value is
198+ ``null``; i.e. the value of the ``item`` field is of
199+ :doc:`BSON Type </reference/bson-types>` ``Null``
200+ (type number ``10``) :
180201
181202 - id: ruby
182203 content: |
183- The ``{ item => { $type => 10 } }`` query matches documents that
184- contains the ``item`` field whose value is ``nil`` *only*;
185- i.e. the value of the ``item`` field is of BSON Type ``Null``
186- (i.e. ``10``) :
204+ The ``{ item => { $type => 10 } }`` query matches *only*
205+ documents that contain the ``item`` field whose value is
206+ ``null``; i.e. the value of the ``item`` field is of
207+ :doc:`BSON Type </reference/bson-types>` ``Null``
208+ (type number ``10``) :
187209
188210 - id: java-sync
189211 content: |
190- The ``type("item", BsonType.NULL)`` query matches documents
191- that contains the ``item`` field whose value is ``null``
192- *only*; i.e. the value of the ``item`` field is of BSON Type
193- ``Null`` (i.e. ``10``) :
212+ The ``type("item", BsonType.NULL)`` query matches *only*
213+ documents that contain the ``item`` field whose value is
214+ ``null``; i.e. the value of the ``item`` field is of
215+ :doc:`BSON Type </reference/bson-types>` ``Null``
216+ (type number ``10``) :
194217
195218 - id: csharp
196219 content: |
197- The ``Type("item", BsonType.Null)`` query using the :csharp-api:`FilterDefinitionBuilder.Type()
198- <Overload_MongoDB_Driver_FilterDefinitionBuilder_1_Type>` method
199- matches documents that contain the ``item`` field whose value is
200- ``null`` *only*; i.e. the value of the ``item`` field is of BSON
201- Type ``Null`` (i.e. ``10``) :
220+ The ``Type("item", BsonType.Null)`` query using the
221+ :csharp-api:`FilterDefinitionBuilder.Type()
222+ <Overload_MongoDB_Driver_FilterDefinitionBuilder_1_Type>`
223+ method matches *only* documents that contain the ``item``
224+ field whose value is ``null``; i.e. the value of the ``item``
225+ field is of :doc:`BSON Type </reference/bson-types>` ``Null``
226+ (type number ``10``) :
202227
203228.. include:: /includes/driver-example-query-40.rst
204229
205230The query returns only the document where the ``item`` field has a
206- ``null`` value .
231+ value of ``null``.
207232
208233Existence Check
209234---------------
@@ -216,6 +241,11 @@ Existence Check
216241 The ``{ item : { $exists: false } }`` query matches documents
217242 that do not contain the ``item`` field:
218243
244+ - id: compass
245+ content: |
246+ The ``{ item : { $exists: false } }`` query matches documents
247+ that do not contain the ``item`` field:
248+
219249 - id: python
220250 content: |
221251 The ``{ item : { $exists: False } }`` query matches documents
@@ -264,8 +294,8 @@ Existence Check
264294
265295.. include:: /includes/driver-example-query-41.rst
266296
267- The query returns only the document that does *not* contain the
268- ``item`` field:
297+ The query only returns the document that does *not* contain the
298+ ``item`` field.
269299
270- .. seealso:: The reference documentation for the :query:`$type` and
300+ .. seealso:: Reference documentation for the :query:`$type` and
271301 :query:`$exists` operators.
0 commit comments