AWS documentdb documentation change
Summary
Entire documentation page for the $lt aggregation operator was removed, including examples in MongoDB Shell, Node.js, and Python
Security assessment
This change removes documentation about the $lt aggregation operator but doesn't indicate any security vulnerability or weakness. The removed content includes standard usage examples and connection strings with placeholders, which is typical documentation content. No security warnings, vulnerability disclosures, or security-related changes are evident in the removed content.
Diff
diff --git a/documentdb/latest/developerguide/lt-aggregation.md b/documentdb/latest/developerguide/lt-aggregation.md index 4bcf5c61c..8b1378917 100644 --- a//documentdb/latest/developerguide/lt-aggregation.md +++ b//documentdb/latest/developerguide/lt-aggregation.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#lt-aggregation "Open PDF") @@ -3,130 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $lt - -The `$lt` aggregation operator compares two values and returns `true` if the first value is less than the second, otherwise returns `false`. - -**Parameters** - - * `expression1`: The first value to compare. - - * `expression2`: The second value to compare. - - - - -## Example (MongoDB Shell) - -The following example demonstrates using the `$lt` operator to identify low stock items. - -**Create sample documents** - - - db.warehouse.insertMany([ - { _id: 1, item: "Bolts", stock: 5 }, - { _id: 2, item: "Nuts", stock: 25 }, - { _id: 3, item: "Screws", stock: 8 } - ]); - -**Query example** - - - db.warehouse.aggregate([ - { - $project: { - item: 1, - stock: 1, - lowStock: { $lt: ["$stock", 10] } - } - } - ]); - -**Output** - - - [ - { _id: 1, item: 'Bolts', stock: 5, lowStock: true }, - { _id: 2, item: 'Nuts', stock: 25, lowStock: false }, - { _id: 3, item: 'Screws', stock: 8, lowStock: true } - ] - -## Code examples - -To view a code example for using the `$lt` aggregation 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('warehouse'); - - const result = await collection.aggregate([ - { - $project: { - item: 1, - stock: 1, - lowStock: { $lt: ["$stock", 10] } - } - } - ]).toArray(); - - console.log(result); - 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['warehouse'] - - result = list(collection.aggregate([ - { - '$project': { - 'item': 1, - 'stock': 1, - 'lowStock': { '$lt': ['$stock', 10] } - } - } - ])) - - 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) - -$log10 - -$lte - -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.