diff options
author | David Storch <david.storch@10gen.com> | 2014-04-30 13:02:47 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2014-05-06 15:52:00 -0400 |
commit | eb97470c0507020e3c0f1cc47751feaa777b5d2e (patch) | |
tree | 49d91ee161d6b61cda68314c463dd292c1f72cca /src/mongo/db/query/planner_access.h | |
parent | b9e8c0fc3fb61f15fcd7516760ad4d49f32f5990 (diff) | |
download | mongo-eb97470c0507020e3c0f1cc47751feaa777b5d2e.tar.gz |
SERVER-13789 recursively build data access for subnodes beneath elemMatch
Diffstat (limited to 'src/mongo/db/query/planner_access.h')
-rw-r--r-- | src/mongo/db/query/planner_access.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/mongo/db/query/planner_access.h b/src/mongo/db/query/planner_access.h index f2d002ae370..71dd60d9f39 100644 --- a/src/mongo/db/query/planner_access.h +++ b/src/mongo/db/query/planner_access.h @@ -163,11 +163,15 @@ namespace mongo { * finding all predicates that can use an index directly and returning * them in the out-parameter vector 'out'. * - * Traverses only through $and and $elemMatch nodes, not through other - * logical or array nodes like $or and $all. + * Traverses only through $and and array nodes like $all. + * + * Other nodes (i.e. nodes which cannot use an index directly, and which are + * neither $and nor array nodes) are returned in 'subnodesOut' if they are + * tagged to use an index. */ static void findElemMatchChildren(const MatchExpression* node, - vector<MatchExpression*>* out); + vector<MatchExpression*>* out, + vector<MatchExpression*>* subnodesOut); /** * Helper used by buildIndexedAnd and buildIndexedOr. |