summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/plan_enumerator.h
diff options
context:
space:
mode:
authorDavid Storch <david.storch@10gen.com>2014-03-05 16:54:14 -0500
committerDavid Storch <david.storch@10gen.com>2014-03-10 16:02:02 -0400
commit25596dbf48b18a76d3d2cdfdf1fcf23a43e46316 (patch)
treecf8a0e5225fad6b165d09f20feaec99d06a8ecc5 /src/mongo/db/query/plan_enumerator.h
parent629de3b0f493ad7517b2aecd6ec616df015f53dc (diff)
downloadmongo-25596dbf48b18a76d3d2cdfdf1fcf23a43e46316.tar.gz
SERVER-13039 handle subnodes which require an index during plan enumeration
Diffstat (limited to 'src/mongo/db/query/plan_enumerator.h')
-rw-r--r--src/mongo/db/query/plan_enumerator.h10
1 files changed, 7 insertions, 3 deletions
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<MatchExpression*>* indexOut,
- vector<MemoID>* subnodesOut);
+ vector<MemoID>* subnodesOut,
+ vector<MemoID>* mandatorySubnodes);
/**
* Finds a set of predicates that can be safely compounded with 'assigned',