-
Type: Bug
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
None
-
Affects Version/s: None
-
Component/s: JavaScript
-
Fully Compatible
-
ALL
> c.find({a:{$gt:new Date()}} ).explain()
{
"cursor" : "BtreeCursor a_1",
"nscanned" : 0,
"nscannedObjects" : 0,
"n" : 0,
"millis" : 0,
"nYields" : 0,
"nChunkSkips" : 0,
"isMultiKey" : false,
"indexOnly" : false,
"indexBounds" :
}
> c.find({a:{$gt:new Date()}} ).explain().indexBounds.a[0][1].valueOf()
9223372036854776000
I think this value is generated by
void BSONObjBuilder::appendMaxForType( const StringData& fieldName , int t ) {
....
....
case Date:
appendDate( fieldName , numeric_limits<long long>::max() ); return;
Potentially this numeric value is invalid for a javascript date, but we might want to do something so the output looks a little nicer.
Also, there could potentially be other issues relating to date values outside an allowed js date range (round tripping, $where style queries, etc). So might be worth spending some time looking into these.
- is related to
-
SERVER-4180 Allow multiple constraints (on same field) within a $elemMatch clause to be used with a multikey index
- Closed