include query fields generating trivial bounds in exact key match check

This commit is contained in:
Aaron
2009-05-13 18:09:25 -04:00
parent 101f01c591
commit 5700a5040d
3 changed files with 12 additions and 1 deletions

View File

@@ -120,7 +120,8 @@ namespace mongo {
optimal_ = true;
if ( exactIndexedQueryCount == fbs.nNontrivialBounds() &&
orderFieldsUnindexed.size() == 0 &&
exactIndexedQueryCount == index->keyPattern().nFields() ) {
exactIndexedQueryCount == index->keyPattern().nFields() &&
exactIndexedQueryCount == fbs.query().nFields() ) {
exactKeyMatch_ = true;
}
if ( startKey_.isEmpty() )