From a7164c0527ac1f231d12a889bf6d16b264af338e Mon Sep 17 00:00:00 2001 From: James Wahlin Date: Thu, 29 Jun 2017 13:41:44 -0400 Subject: SERVER-29814 Move BSONObj::MatchType/BSONElement::getGtLtOp() to matcher --- src/mongo/db/update/pull_node.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/mongo/db/update/pull_node.cpp') diff --git a/src/mongo/db/update/pull_node.cpp b/src/mongo/db/update/pull_node.cpp index 45052c0c0f9..4d9c9c2fa09 100644 --- a/src/mongo/db/update/pull_node.cpp +++ b/src/mongo/db/update/pull_node.cpp @@ -129,7 +129,8 @@ Status PullNode::init(BSONElement modExpr, const CollatorInterface* collator) { try { if (modExpr.type() == mongo::Object && - modExpr.embeddedObject().firstElement().getGtLtOp(-1) == -1) { + !MatchExpressionParser::parsePathAcceptingKeyword( + modExpr.embeddedObject().firstElement())) { _matcher = stdx::make_unique(modExpr.embeddedObject(), collator); } else if (modExpr.type() == mongo::Object || modExpr.type() == mongo::RegEx) { _matcher = stdx::make_unique(modExpr, collator); -- cgit v1.2.1