AWS documentdb documentation change
Summary
Entire documentation page for the $size query operator has been removed, including examples in MongoDB Shell, Node.js, and Python.
Security assessment
This change removes documentation content entirely but shows no evidence of addressing a security vulnerability. The removed content includes standard query operator examples without any security context or vulnerability mentions. This appears to be a documentation reorganization or removal of duplicate content rather than a security-related update.
Diff
diff --git a/documentdb/latest/developerguide/size-query.md b/documentdb/latest/developerguide/size-query.md index 83794baa5..8b1378917 100644 --- a//documentdb/latest/developerguide/size-query.md +++ b//documentdb/latest/developerguide/size-query.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#size-query "Open PDF") @@ -3,104 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $size - -The `$size` query operator matches documents where an array field has exactly the specified number of elements. This is useful for filtering documents based on array length. - -**Parameters** - - * `field`: The array field to check. - - * `count`: The exact number of elements the array must contain. - - - - -## Example (MongoDB Shell) - -The following example demonstrates using the `$size` operator to find all products that have exactly three tags. - -**Create sample documents** - - - db.products.insertMany([ - { _id: 1, name: "Laptop", tags: ["electronics", "computers", "portable"] }, - { _id: 2, name: "Mouse", tags: ["electronics", "accessories"] }, - { _id: 3, name: "Desk", tags: ["furniture", "office", "workspace"] }, - { _id: 4, name: "Monitor", tags: ["electronics"] } - ]); - -**Query example** - - - db.products.find({ tags: { $size: 3 } }); - -**Output** - - - { "_id" : 1, "name" : "Laptop", "tags" : [ "electronics", "computers", "portable" ] } - { "_id" : 3, "name" : "Desk", "tags" : [ "furniture", "office", "workspace" ] } - -## Code examples - -To view a code example for using the `$size` query operator, 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 collection = db.collection('products'); - - const result = await collection.find({ tags: { $size: 3 } }).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'] - collection = db['products'] - - result = list(collection.find({'tags': {'$size': 3}})) - - print(result) - client.close() - - example() - - **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) - -$slice - -$text - -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.