AWS documentdb documentation change
Summary
Entire documentation page for the $exp operator was removed, including examples, code samples, and usage instructions for mathematical operations in Amazon DocumentDB.
Security assessment
This change removes documentation about the $exp operator functionality. There is no evidence in the diff that this removal addresses a specific security vulnerability, weakness, or incident. The removed content appears to be standard operational documentation without security implications.
Diff
diff --git a/documentdb/latest/developerguide/exp.md b/documentdb/latest/developerguide/exp.md index b58cbe842..8b1378917 100644 --- a//documentdb/latest/developerguide/exp.md +++ b//documentdb/latest/developerguide/exp.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#exp "Open PDF") @@ -3,122 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $exp - -New from version 4.0 - -The `$exp` operator in Amazon DocumentDB allows you to raise the constant e to a given number. - -**Parameters** - - * `expression`: The expression to evaluate. This can be any valid aggregation expression, including field references, arithmetic operations, and other aggregation stages. - - - - -## Example (MongoDB Shell) - -The following example demonstrates the use of the `$exp` operator to find all documents where the `quantity` field is greater than the `price` field. - -**Create sample documents** - - - db.items.insertMany([ - { item: "canvas", quantity: 4 }, - { item: "journal", quantity: 2 } - ]); - -**Query example** - - - db.items.aggregate([ - { $project: { - "quantityRaised": {$exp: "$quantity"}} - } - ]); - -**Output** - - - [ - { - _id: ObjectId('6920b785311cf98b79d2950d'), - quantityRaised: 54.598150033144236 - }, - { - _id: ObjectId('6920b785311cf98b79d2950e'), - quantityRaised: 7.38905609893065 - } - ] - -## Code examples - -To view a code example for using the `$exp` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function aggregateExp() { - 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 items = db.collection('items'); - - const result = await items.aggregate([ - { $project: { - "quantityRaised": {$exp: "$quantity"}} - } - ]).toArray(); - - console.log(result); - client.close(); - } - - aggregateExp(); - -Python - - - - from pymongo import MongoClient - - def aggregate_exp(): - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - db = client.test - items = db.items - - result = list(items.aggregate([ - { "$project": { - "quantityRaised": {"$exp": "$quantity"}} - } - ])) - - print(result) - client.close() - - aggregate_exp() - - **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) - -$eq - -$filter - -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.