From 51195ac95af60ba33d1830900502a7fabd54de4b Mon Sep 17 00:00:00 2001 From: Adam C Date: Thu, 26 Jul 2012 23:08:44 +0200 Subject: [PATCH] Update source/reference/operators.txt Added a note on how to search for MinKey - already added to wiki --- source/reference/operators.txt | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/source/reference/operators.txt b/source/reference/operators.txt index b80e136b117..97539207d69 100644 --- a/source/reference/operators.txt +++ b/source/reference/operators.txt @@ -479,7 +479,16 @@ Element ``MinKey`` and ``MaxKey`` compare less than and greater than all other possible :term:`BSON` element values, respectively, and exist - primarily for internal use. + primarily for internal use. + + .. note:: + + Searching for ``MaxKey`` by type will work as expected, however + to search for ``MinKey`` you must use -1, for example: + + .. code-block:: javascript + + db.collection.find( { field: { $type: -1 } } ); .. note::