summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression.cpp
diff options
context:
space:
mode:
authorauto-revert-processor <dev-prod-dag@mongodb.com>2023-01-26 09:49:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-01-26 10:25:30 +0000
commitcc0dc721042c7ffa2d00a0f414d65c650f646918 (patch)
tree2a07cba6206a4561be2c343c516284a33d1f6942 /src/mongo/db/pipeline/expression.cpp
parent875e14f1adb92cb0ab0e8b2aaffa3c7f73d49e4a (diff)
downloadmongo-cc0dc721042c7ffa2d00a0f414d65c650f646918.tar.gz
Revert "SERVER-72688 $meta aggregate expression should be marked as unstable for API Version 1"
This reverts commit 2264da942fe2e4cbd0ee10742ce14758bd8303ef.
Diffstat (limited to 'src/mongo/db/pipeline/expression.cpp')
-rw-r--r--src/mongo/db/pipeline/expression.cpp20
1 files changed, 1 insertions, 19 deletions
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp
index 5c97ebfc736..ced1cf0f7fc 100644
--- a/src/mongo/db/pipeline/expression.cpp
+++ b/src/mongo/db/pipeline/expression.cpp
@@ -3017,12 +3017,7 @@ Expression::ComputedPaths ExpressionMap::getComputedPaths(const std::string& exp
/* ------------------------- ExpressionMeta ----------------------------- */
-REGISTER_EXPRESSION_CONDITIONALLY(meta,
- ExpressionMeta::parse,
- AllowedWithApiStrict::kConditionally,
- AllowedWithClientType::kAny,
- boost::none,
- true);
+REGISTER_STABLE_EXPRESSION(meta, ExpressionMeta::parse);
namespace {
const std::string textScoreName = "textScore";
@@ -3077,19 +3072,6 @@ intrusive_ptr<Expression> ExpressionMeta::parse(ExpressionContext* const expCtx,
uassert(17307, "$meta only supports string arguments", expr.type() == String);
const auto iter = kMetaNameToMetaType.find(expr.valueStringData());
-
- const auto apiStrict =
- expCtx->opCtx && APIParameters::get(expCtx->opCtx).getAPIStrict().value_or(false);
-
- auto typeName = iter->first;
- auto usesUnstableField = (typeName == "searchScore") || (typeName == "indexKey") ||
- (typeName == "textScore") || (typeName == "searchHighlights");
-
- if (apiStrict && usesUnstableField) {
- uasserted(ErrorCodes::APIStrictError,
- "Provided apiStrict is true with an unstable parameter");
- }
-
if (iter != kMetaNameToMetaType.end()) {
return new ExpressionMeta(expCtx, iter->second);
} else {