summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline')
-rw-r--r--src/mongo/db/pipeline/document_source_match.cpp1
-rw-r--r--src/mongo/db/pipeline/document_source_match_test.cpp5
2 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_match.cpp b/src/mongo/db/pipeline/document_source_match.cpp
index c67b65c8d23..38c78d8ad30 100644
--- a/src/mongo/db/pipeline/document_source_match.cpp
+++ b/src/mongo/db/pipeline/document_source_match.cpp
@@ -268,6 +268,7 @@ Document redactSafePortionDollarOps(BSONObj expr) {
case PathAcceptingKeyword::INTERNAL_SCHEMA_OBJECT_MATCH:
case PathAcceptingKeyword::INTERNAL_SCHEMA_MIN_LENGTH:
case PathAcceptingKeyword::INTERNAL_SCHEMA_MAX_LENGTH:
+ case PathAcceptingKeyword::INTERNAL_SCHEMA_MATCH_ARRAY_INDEX:
continue;
}
}
diff --git a/src/mongo/db/pipeline/document_source_match_test.cpp b/src/mongo/db/pipeline/document_source_match_test.cpp
index 33e10840ecd..6eb793d76d6 100644
--- a/src/mongo/db/pipeline/document_source_match_test.cpp
+++ b/src/mongo/db/pipeline/document_source_match_test.cpp
@@ -118,6 +118,11 @@ TEST_F(DocumentSourceMatchTest, RedactSafePortion) {
assertExpectedRedactSafePortion("{a: {$_internalSchemaFmod: [4.5, 2.3]}}", "{}");
+ assertExpectedRedactSafePortion(
+ "{a: {$_internalSchemaMatchArrayIndex:"
+ "{index: 0, namePlaceholder: 'i', expression: {i: {$gt: 0}}}}}",
+ "{}");
+
// Combinations
assertExpectedRedactSafePortion("{a:1, b: 'asdf'}", "{a:1, b: 'asdf'}");