mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 09:06:21 +01:00
Ignore index direction when bounding btree cursor, as btree doesn't yet support directional indexes.
This commit is contained in:
parent
92a5ab8180
commit
6215e19014
@ -65,8 +65,10 @@ void BtreeCursor::findExtremeKeys( const BSONObj &query ) {
|
||||
for( set<string>::iterator i = fields.begin(); i != fields.end(); ++i ) {
|
||||
const char * field = i->c_str();
|
||||
BSONElement k = indexDetails.keyPattern().getFieldDotted( field );
|
||||
int number = (int) k.number(); // returns 0.0 if not numeric
|
||||
bool forward = ( ( number >= 0 ? 1 : -1 ) * direction > 0 );
|
||||
// int number = (int) k.number(); // returns 0.0 if not numeric
|
||||
// bool forward = ( ( number >= 0 ? 1 : -1 ) * direction > 0 );
|
||||
// Temporary, until btree supports directional indexes.
|
||||
bool forward = ( direction > 0 );
|
||||
BSONElement lowest = minKey.firstElement();
|
||||
BSONElement highest = maxKey.firstElement();
|
||||
BSONElement e = query.getFieldDotted( field );
|
||||
|
Loading…
Reference in New Issue
Block a user