AWS documentdb documentation change
Summary
Removed entire documentation page for the $ne query operator, including examples and code samples in multiple languages
Security assessment
This change removes documentation about the $ne query operator but provides no indication of security issues. The removed content includes standard usage examples without any security warnings or vulnerability disclosures. This appears to be documentation cleanup or reorganization rather than security-related changes.
Diff
diff --git a/documentdb/latest/developerguide/ne.md b/documentdb/latest/developerguide/ne.md index 9f82d37f2..8b1378917 100644 --- a//documentdb/latest/developerguide/ne.md +++ b//documentdb/latest/developerguide/ne.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#ne "Open PDF") @@ -3,113 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $ne - -The `$ne` operator is used to match documents where the value of a field is not equal to the specified value. It is a comparison operator that can be used in query predicates to filter documents. - -Planner version 2.0 added index support for `$ne`. - -**Parameters** - - * `field`: The field to check. - - * `value`: The value to check against. - - - - -## Example (MongoDB Shell) - -In this example, we'll find all documents in the `users` collection where the `status` field is not equal to `"active"`. - -**Create sample documents** - - - db.users.insertMany([ - { name: "John", status: "active" }, - { name: "Jane", status: "inactive" }, - { name: "Bob", status: "suspended" }, - { name: "Alice", status: "active" } - ]); - -**Query example** - - - db.users.find({ status: { $ne: "active" } }); - -**Output** - - - [ - { - _id: ObjectId('...'), - name: 'Jane', - status: 'inactive' - }, - { - _id: ObjectId('...'), - name: 'Bob', - status: 'suspended' - } - ] - -## Code examples - -To view a code example for using the `$ne` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function main() { - 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 users = db.collection('users'); - - const result = await users.find({ status: { $ne: 'active' } }).toArray(); - console.log(result); - - await client.close(); - } - - main(); - -Python - - - - from pymongo import MongoClient - - client = MongoClient('mongodb://<username>:<password>@<cluster-endpoint>:27017/?tls=true&tlsCAFile=global-bundle.pem&replicaSet=rs0&readPreference=secondaryPreferred&retryWrites=false') - db = client['test'] - users = db['users'] - - result = list(users.find({ 'status': { '$ne': 'active' } })) - print(result) - - client.close() - - **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) - -$meta - -$nin - -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.