We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9f29fe7 commit 51195acCopy full SHA for 51195ac
source/reference/operators.txt
@@ -479,7 +479,16 @@ Element
479
480
``MinKey`` and ``MaxKey`` compare less than and greater than all
481
other possible :term:`BSON` element values, respectively, and exist
482
- primarily for internal use.
+ primarily for internal use.
483
+
484
+ .. note::
485
486
+ Searching for ``MaxKey`` by type will work as expected, however
487
+ to search for ``MinKey`` you must use -1, for example:
488
489
+ .. code-block:: javascript
490
491
+ db.collection.find( { field: { $type: -1 } } );
492
493
.. note::
494
0 commit comments