IndexSuitability IndexSpec::_suitability( const FieldRangeSet& queryConstraints , const BSONObj& order ) const { // TODO: optimize if ( ! anyElementNamesMatch( keyPattern , queryConstraints.simplifiedQuery(keyPattern) ) && ! anyElementNamesMatch( keyPattern , order ) ) return USELESS; return HELPFUL; }
IndexSuitability ixmIndexKeyGen::_suitability( const BSONObj& query , const BSONObj& order ) const { if ( anyElementNamesMatch( _keyPattern , query ) == 0 && anyElementNamesMatch( _keyPattern , order ) == 0 ) return USELESS; return HELPFUL; }
IndexSuitability IndexSpec::_suitability( const BSONObj& query , const BSONObj& order ) const { // TODO: optimize if ( anyElementNamesMatch( keyPattern , query ) == 0 && anyElementNamesMatch( keyPattern , order ) == 0 ) return USELESS; return HELPFUL; }