diff options
author | David Storch <david.storch@10gen.com> | 2017-12-20 11:21:27 -0500 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2017-12-29 13:17:52 -0500 |
commit | 6699621bfb54174c7ee082ee85c62211788942c3 (patch) | |
tree | 1abb4f436e3d6c67e84ed25aeaa08909ec02dbec /src/mongo/db/query/planner_ixselect.h | |
parent | 85fa19c04ca0059b8aa5689028d1e7d799c19483 (diff) | |
download | mongo-6699621bfb54174c7ee082ee85c62211788942c3.tar.gz |
SERVER-31760 Add index support for InternalExprEqMatchExpression.
Diffstat (limited to 'src/mongo/db/query/planner_ixselect.h')
-rw-r--r-- | src/mongo/db/query/planner_ixselect.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/mongo/db/query/planner_ixselect.h b/src/mongo/db/query/planner_ixselect.h index 7cb34973810..715df2014fe 100644 --- a/src/mongo/db/query/planner_ixselect.h +++ b/src/mongo/db/query/planner_ixselect.h @@ -84,8 +84,6 @@ public: * * For an index to be useful to a predicate, the index must be compatible (see above). * - * If an index is prefixed by the predicate's path, it's always useful. - * * If an index is compound but not prefixed by a predicate's path, it's only useful if * there exists another predicate that 1. will use that index and 2. is related to the * original predicate by having an AND as a parent. @@ -131,6 +129,12 @@ public: static void stripUnneededAssignments(MatchExpression* node, const std::vector<IndexEntry>& indices); + /** + * Returns true if the indexed field has any multikey components. Illegal to call unless + * 'indexedField' is present in the key pattern for 'index'. + */ + static bool indexedFieldHasMultikeyComponents(StringData indexedField, const IndexEntry& index); + private: /** * Amend the RelevantTag lists for all predicates in the subtree rooted at 'node' to remove |