summaryrefslogtreecommitdiff
path: root/db/matcher.h
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-06-07 19:01:46 -0700
committerAaron <aaron@10gen.com>2010-06-07 19:01:46 -0700
commit1f84e41c344d4ef0e8caa02ed7bf00fcf8cf3b76 (patch)
tree090e31a40c094f2057da6e1183c2e74d643b49d0 /db/matcher.h
parent7c420d1897ff2944bc4a6276e53e9d2460d78935 (diff)
downloadmongo-1f84e41c344d4ef0e8caa02ed7bf00fcf8cf3b76.tar.gz
SERVER-109 keymatch
Diffstat (limited to 'db/matcher.h')
-rw-r--r--db/matcher.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/db/matcher.h b/db/matcher.h
index 2a1a73a7ddc..362376b8132 100644
--- a/db/matcher.h
+++ b/db/matcher.h
@@ -140,8 +140,10 @@ namespace mongo {
bool matches(const BSONObj& j, MatchDetails * details = 0 );
- // until SERVER-109 $or is opaque to indexes
- bool keyMatch() const { return !all && !haveSize && !hasArray && !haveNeg && _orMatchers.size() == 0; }
+ // fast rough check to see if we must load the real doc - we also
+ // compare field counts against covereed index matcher; for $or clauses
+ // we just compare field counts
+ bool keyMatch() const { return !all && !haveSize && !hasArray && !haveNeg; }
bool atomic() const { return _atomic; }