diff options
Diffstat (limited to 'src/mongo/db/pipeline/field_path.cpp')
| -rw-r--r-- | src/mongo/db/pipeline/field_path.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/mongo/db/pipeline/field_path.cpp b/src/mongo/db/pipeline/field_path.cpp index 28cd63e2c05..ab00617bbd3 100644 --- a/src/mongo/db/pipeline/field_path.cpp +++ b/src/mongo/db/pipeline/field_path.cpp @@ -54,12 +54,7 @@ const StringDataSet kAllowedDollarPrefixedFields = { "$sortKey", // This is necessary for the "showRecordId" feature. - "$recordId", - - // This is necessary for $search queries with a specified sort. - "$searchSortValues"_sd, - "$searchScore"_sd, -}; + "$recordId"}; } // namespace @@ -74,7 +69,7 @@ string FieldPath::getFullyQualifiedPath(StringData prefix, StringData suffix) { return str::stream() << prefix << "." << suffix; } -FieldPath::FieldPath(std::string inputPath, bool validateFieldNames) +FieldPath::FieldPath(std::string inputPath) : _fieldPath(std::move(inputPath)), _fieldPathDotPosition{string::npos}, _fieldHash{kHashUninitialized} { @@ -98,10 +93,7 @@ FieldPath::FieldPath(std::string inputPath, bool validateFieldNames) "FieldPath is too long", pathLength <= BSONDepth::getMaxAllowableDepth()); for (size_t i = 0; i < pathLength; ++i) { - const auto& fieldName = getFieldName(i); - if (validateFieldNames) { - uassertValidFieldName(fieldName); - } + uassertValidFieldName(getFieldName(i)); } } |
