AWS Security ChangesHomeSearch

AWS documentdb documentation change

Service: documentdb · 2026-03-28 · Documentation low

File: documentdb/latest/developerguide/elemMatch.md

Summary

Removed entire documentation content for the $elemMatch operator, including examples, code samples, and usage instructions

Security assessment

This change removes documentation content entirely without any mention of security vulnerabilities, weaknesses, or incidents. The removal appears to be a documentation restructuring or deprecation of content, not related to addressing a security issue. No security implications are evident from the removal of operator documentation.

Diff

diff --git a/documentdb/latest/developerguide/elemMatch.md b/documentdb/latest/developerguide/elemMatch.md
index 311f3ce90..8b1378917 100644
--- a//documentdb/latest/developerguide/elemMatch.md
+++ b//documentdb/latest/developerguide/elemMatch.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#elemMatch "Open PDF")
@@ -3,120 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $elemMatch
-
-The `$elemMatch` operator in Amazon DocumentDB is used to query an array field and return documents where at least one element in the array matches the specified criteria. This operator is particularly useful when you have complex data structures with nested arrays or embedded documents.
-
-Planner version 2.0 added index support for `$elemMatch`.
-
-**Parameters**
-
-  * `field`: The array field to query.
-
-  * `query`: The criteria to match against the array elements.
-
-
-
-
-**Using`$elemMatch` within an `$all` expression**
-
-See [Using $elemMatch within an $all expression](./functional-differences.html#functional-differences.elemMatch) for limitations regarding the use of the `$elemMatch` operator within an `$all` expression.
-
-## Example (MongoDB Shell)
-
-The following example demonstrates how to use the `$elemMatch` operator to find documents where the `parts` array has at least one element that matches the specified criteria.
-
-**Create sample documents**
-    
-    
-    db.col.insertMany([
-      { _id: 1, parts: [{ part: "xyz", qty: 10 }, { part: "abc", qty: 20 }] },
-      { _id: 2, parts: [{ part: "xyz", qty: 5 }, { part: "abc", qty: 10 }] },
-      { _id: 3, parts: [{ part: "xyz", qty: 15 }, { part: "abc", qty: 100 }] },
-      { _id: 4, parts: [{ part: "abc", qty: 150 }] }
-    ]);
-
-**Query example**
-    
-    
-    db.col.find({
-      parts: { "$elemMatch": { part: "xyz", qty: { $lt: 11 } } }
-    })
-
-**Output**
-    
-    
-    { "_id" : 1, "parts" : [ { "part" : "xyz", "qty" : 10 }, { "part" : "abc", "qty" : 20 } ] }
-    { "_id" : 2, "parts" : [ { "part" : "xyz", "qty" : 5 }, { "part" : "abc", "qty" : 10 } ] }
-
-## Code examples
-
-To view a code example for using the `$elemMatch` command, choose the tab for the language that you want to use:
-
-Node.js
-    
-    
-    
-    const { MongoClient } = require('mongodb');
-    
-    async function example() {
-      const client = await MongoClient.connect('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false');
-      const db = client.db('test');
-      const col = db.collection('col');
-    
-      const result = await col.find({
-        parts: { 
-          "$elemMatch": { part: "xyz", qty: { $lt: 11 } } 
-        }
-      }).toArray();
-    
-      console.log(JSON.stringify(result, null, 2));
-      await client.close();
-    }
-    
-    example();
-
-Python
-    
-    
-    
-    from pymongo import MongoClient
-    
-    def example():
-        client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false')
-        db = client['test']
-        col = db['col']
-    
-        result = list(col.find({
-          'parts': { 
-            '$elemMatch': {'part': 'xyz', 'qty': {'$lt': 11}} 
-          }
-        }))
-    
-        print(result)
-        client.close()
-    
-    example()
-
-![Warning](https://d1ge0kk1l5kms0.cloudfront.net/images/G/01/webservices/console/warning.png) **Javascript is disabled or is unavailable in your browser.**
-
-To use the Amazon Web Services Documentation, Javascript must be enabled. Please refer to your browser's Help pages for instructions.
-
-[Document Conventions](/general/latest/gr/docconventions.html)
-
-$comment
-
-$eq
-
-Did this page help you? - Yes
-
-Thanks for letting us know we're doing a good job!
-
-If you've got a moment, please tell us what we did right so we can do more of it.
-
-Did this page help you? - No
-
-Thanks for letting us know this page needs work. We're sorry we let you down.
-
-If you've got a moment, please tell us how we can make the documentation better.