AWS documentdb documentation change
Summary
Entire documentation page for the $gt aggregation operator was removed, including examples in MongoDB Shell, Node.js, and Python
Security assessment
This change removes documentation about the $gt aggregation operator but shows no evidence of addressing a security vulnerability. The removed content includes standard usage examples and connection strings with placeholder credentials, which is normal documentation practice. No security advisories, vulnerability disclosures, or security-related warnings were added or modified in this change.
Diff
diff --git a/documentdb/latest/developerguide/gt-aggregation.md b/documentdb/latest/developerguide/gt-aggregation.md index b965c9587..8b1378917 100644 --- a//documentdb/latest/developerguide/gt-aggregation.md +++ b//documentdb/latest/developerguide/gt-aggregation.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#gt-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 - -# $gt - -The `$gt` aggregation operator compares two values and returns `true` if the first value is greater 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 `$gt` operator to identify products exceeding a price threshold. - -**Create sample documents** - - - db.products.insertMany([ - { _id: 1, name: "Laptop", price: 1200 }, - { _id: 2, name: "Mouse", price: 25 }, - { _id: 3, name: "Monitor", price: 400 } - ]); - -**Query example** - - - db.products.aggregate([ - { - $project: { - name: 1, - price: 1, - expensive: { $gt: ["$price", 100] } - } - } - ]); - -**Output** - - - [ - { _id: 1, name: 'Laptop', price: 1200, expensive: true }, - { _id: 2, name: 'Mouse', price: 25, expensive: false }, - { _id: 3, name: 'Monitor', price: 400, expensive: true } - ] - -## Code examples - -To view a code example for using the `$gt` 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('products'); - - const result = await collection.aggregate([ - { - $project: { - name: 1, - price: 1, - expensive: { $gt: ["$price", 100] } - } - } - ]).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['products'] - - result = list(collection.aggregate([ - { - '$project': { - 'name': 1, - 'price': 1, - 'expensive': { '$gt': ['$price', 100] } - } - } - ])) - - 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) - -$group - -$gte - -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.