diff options
author | David Storch <david.storch@10gen.com> | 2015-05-29 19:15:19 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2015-07-10 17:11:16 -0400 |
commit | 15c72c8570c63e2e6ba0a3d339a8286d0be604db (patch) | |
tree | 96cc37b3259e9ce7472132b8c414eb614317c037 /src/mongo/db/query/query_planner_common.h | |
parent | 9c63b79a8d5c8d19663850f9d668a3581dea77d5 (diff) | |
download | mongo-15c72c8570c63e2e6ba0a3d339a8286d0be604db.tar.gz |
SERVER-13732 rewrite contained $or queries to rooted $or in the SubplanStage
This allows queries with an $or contained within an explicit or implicit $and to be answered with
more efficient plans. It also expands the use of the SubplanStage to include contained $or queries
and therefore may reduce the number of plans considered for these queries.
Diffstat (limited to 'src/mongo/db/query/query_planner_common.h')
-rw-r--r-- | src/mongo/db/query/query_planner_common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/query/query_planner_common.h b/src/mongo/db/query/query_planner_common.h index 4fdf8f30815..d62c9c7a3ba 100644 --- a/src/mongo/db/query/query_planner_common.h +++ b/src/mongo/db/query/query_planner_common.h @@ -44,9 +44,9 @@ public: * * If 'out' is not NULL, sets 'out' to the first node of type 'type' encountered. */ - static bool hasNode(MatchExpression* root, + static bool hasNode(const MatchExpression* root, MatchExpression::MatchType type, - MatchExpression** out = NULL) { + const MatchExpression** out = NULL) { if (type == root->matchType()) { if (NULL != out) { *out = root; |