From 25596dbf48b18a76d3d2cdfdf1fcf23a43e46316 Mon Sep 17 00:00:00 2001 From: David Storch Date: Wed, 5 Mar 2014 16:54:14 -0500 Subject: SERVER-13039 handle subnodes which require an index during plan enumeration --- src/mongo/db/query/plan_enumerator.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/mongo/db/query/plan_enumerator.h') diff --git a/src/mongo/db/query/plan_enumerator.h b/src/mongo/db/query/plan_enumerator.h index 9cd850e2ab0..730d9f2af40 100644 --- a/src/mongo/db/query/plan_enumerator.h +++ b/src/mongo/db/query/plan_enumerator.h @@ -251,14 +251,18 @@ namespace mongo { * information due to flattening. * * Nodes that cannot be deeply traversed are returned via the output - * vector 'subnodesOut'. + * vectors 'subnodesOut' and 'mandatorySubnodes'. Subnodes are "mandatory" + * if they *must* use an index (TEXT and GEO). * * Does not take ownership of arguments. + * + * Returns false if the AND cannot be indexed. Otherwise returns true. */ - void partitionPreds(MatchExpression* node, + bool partitionPreds(MatchExpression* node, PrepMemoContext context, vector* indexOut, - vector* subnodesOut); + vector* subnodesOut, + vector* mandatorySubnodes); /** * Finds a set of predicates that can be safely compounded with 'assigned', -- cgit v1.2.1