File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -480,8 +480,8 @@ Element
480
480
.. note::
481
481
482
482
Query statements cannot use :operator:`$type` to test arrays
483
- (i.e. ``4``.) Instead use an operation with the
484
- :operator:`$where` that resembles the following:
483
+ (i.e. ``4``.) Instead, use the :operator:`$where` operator that
484
+ resembles the following:
485
485
486
486
.. code-block:: javascript
487
487
@@ -490,6 +490,15 @@ Element
490
490
See the :issue:`SERVER-1475` for more information about the
491
491
array type.
492
492
493
+ For internal usage, such as querying for the minimum value of a
494
+ shard key, the ``$minkey`` value is ``-1``. One would use the
495
+ following code to find the minimum :term:`shard key` of a
496
+ :term:`shard cluster`.
497
+
498
+ .. code-block:: javascript
499
+
500
+ db.chunks.find( { "min.shardKey": { $type: -1 } } )
501
+
493
502
.. operator:: $regex
494
503
495
504
The :operator:`$regex` operator provides regular expression
You can’t perform that action at this time.
0 commit comments