fix $(gl)te? scanning for numeric indexes SERVER-99

This commit is contained in:
Eliot Horowitz
2009-07-06 10:42:22 -04:00
parent 32e0fef68b
commit 7bb37b3fd2
3 changed files with 29 additions and 7 deletions

View File

@@ -85,6 +85,14 @@ namespace mongo {
default:
break;
}
if ( lower_.isNumber() && upper_.type() == MaxKey ){
upper_ = addObj( BSON( lower_.fieldName() << numeric_limits<double>::max() ) ).firstElement();
}
else if ( upper_.isNumber() && lower_.type() == MinKey ){
lower_ = addObj( BSON( upper_.fieldName() << - numeric_limits<double>::max() ) ).firstElement();
}
}
const FieldBound &FieldBound::operator&=( const FieldBound &other ) {