diff options
Diffstat (limited to 'src/mongo/db/query/indexability.h')
| -rw-r--r-- | src/mongo/db/query/indexability.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/mongo/db/query/indexability.h b/src/mongo/db/query/indexability.h index 1736d92a89b..7e543da4a2d 100644 --- a/src/mongo/db/query/indexability.h +++ b/src/mongo/db/query/indexability.h @@ -55,26 +55,6 @@ public: } /** - * Type bracketing does not apply to internal Expressions. This could cause the use of a sparse - * index return incomplete results. For example, a query {$expr: {$lt: ["$missing", "r"]}} would - * expect a document like, {a: 1}, with field "missing" missing be returned. However, a sparse - * index, {missing: 1} does not index the document. Therefore, we should ban use of any sparse - * index on following expression types. - */ - static bool nodeSupportedBySparseIndex(const MatchExpression* me) { - switch (me->matchType()) { - case MatchExpression::INTERNAL_EXPR_EQ: - case MatchExpression::INTERNAL_EXPR_GT: - case MatchExpression::INTERNAL_EXPR_GTE: - case MatchExpression::INTERNAL_EXPR_LT: - case MatchExpression::INTERNAL_EXPR_LTE: - return false; - default: - return true; - } - } - - /** * This array operator doesn't have any children with fields and can use an index. * * Example: a: {$elemMatch: {$gte: 1, $lte: 1}}. @@ -136,20 +116,6 @@ public: } /** - * Returns true if 'me' is ELEM_MATCH_OBJECT and has non-empty path component. - * - * Note: we skip empty path components since they are not allowed in index key patterns. - * Therefore, $elemMatch with an empty path component can never use an index. - * - * Example: {"": {$elemMatch: {a: "hi", b: "bye"}}. - * In this case the predicate cannot use any indexes since the $elemMatch is with an empty path - * component. - */ - static bool isBoundsGeneratingElemMatchObject(const MatchExpression* me) { - return arrayUsesIndexOnChildren(me) && !me->path().empty(); - } - - /** * Returns true if 'me' is a NOT, and the child of the NOT can use * an index on its own field. */ |
