summaryrefslogtreecommitdiff
path: root/src/mongo/db/ops/modifier_pull.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/ops/modifier_pull.cpp')
-rw-r--r--src/mongo/db/ops/modifier_pull.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/mongo/db/ops/modifier_pull.cpp b/src/mongo/db/ops/modifier_pull.cpp
index 70d5442a716..f3adc0e3538 100644
--- a/src/mongo/db/ops/modifier_pull.cpp
+++ b/src/mongo/db/ops/modifier_pull.cpp
@@ -109,7 +109,9 @@ Status ModifierPull::init(const BSONElement& modExpr, const Options& opts, bool*
_exprObj = _exprElt.embeddedObject();
// If not is not a query operator, then it is a primitive.
- _matcherOnPrimitive = (_exprObj.firstElement().getGtLtOp() != 0);
+ _matcherOnPrimitive = (MatchExpressionParser::parsePathAcceptingKeyword(
+ _exprObj.firstElement(), PathAcceptingKeyword::EQUALITY) !=
+ PathAcceptingKeyword::EQUALITY);
// If the object is primitive then wrap it up into an object.
if (_matcherOnPrimitive)