summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/expression.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/expression.cpp')
-rw-r--r--src/mongo/db/pipeline/expression.cpp17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/mongo/db/pipeline/expression.cpp b/src/mongo/db/pipeline/expression.cpp
index 61abc3f009b..6d307929e3e 100644
--- a/src/mongo/db/pipeline/expression.cpp
+++ b/src/mongo/db/pipeline/expression.cpp
@@ -2634,22 +2634,13 @@ Value ExpressionMeta::evaluate(const Document& root, Variables* variables) const
}
void ExpressionMeta::_doAddDependencies(DepsTracker* deps) const {
- if (_metaType == MetaType::kTextScore) {
- deps->setNeedsMetadata(DepsTracker::MetadataType::TEXT_SCORE, true);
-
+ if (_metaType == MetaType::kSearchScore || _metaType == MetaType::kSearchHighlights) {
// We do not add the dependencies for SEARCH_SCORE or SEARCH_HIGHLIGHTS because those values
// are not stored in the collection (or in mongod at all).
- } else if (_metaType == MetaType::kGeoNearDist) {
- deps->setNeedsMetadata(DepsTracker::MetadataType::GEO_NEAR_DISTANCE, true);
- } else if (_metaType == MetaType::kGeoNearPoint) {
- deps->setNeedsMetadata(DepsTracker::MetadataType::GEO_NEAR_POINT, true);
- } else if (_metaType == MetaType::kRecordId) {
- // TODO: SERVER-42560 handle passing of metadata between PlanStage and DS layers.
- } else if (_metaType == MetaType::kIndexKey) {
- // TODO: SERVER-42560 handle passing of metadata between PlanStage and DS layers.
- } else if (_metaType == MetaType::kSortKey) {
- deps->setNeedsMetadata(DepsTracker::MetadataType::SORT_KEY, true);
+ return;
}
+
+ deps->setNeedsMetadata(_metaType, true);
}
/* ----------------------- ExpressionMod ---------------------------- */