AWS documentdb documentation change
Summary
Entire documentation page for the $text operator in Amazon DocumentDB has been removed, including all examples, code samples, and usage instructions
Security assessment
This change removes documentation content entirely without any mention of security vulnerabilities, patches, or security-related fixes. The removal appears to be a content reorganization or deprecation of documentation rather than addressing a specific security issue. No security warnings, vulnerability disclosures, or security guidance is present in the removed content or the change itself.
Diff
diff --git a/documentdb/latest/developerguide/text.md b/documentdb/latest/developerguide/text.md index 85f0db424..8b1378917 100644 --- a//documentdb/latest/developerguide/text.md +++ b//documentdb/latest/developerguide/text.md @@ -1 +0,0 @@ -[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#text "Open PDF") @@ -3,121 +1,0 @@ -[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html) - -Example (MongoDB Shell)Code examples - -# $text - -The `$text` operator is used to perform full-text search on text-indexed fields within a document collection. This operator allows you to search for documents that contain specific words or phrases, and can be combined with other query operators to filter results based on additional criteria. - -**Parameters** - - * `$search`: The text string to search for. - - - - -## Example (MongoDB Shell) - -The following example demonstrates how to use the `$text` operator to search for documents containing the word "interest" and filter the results based on a "star_rating" field. - -**Create sample documents** - - - db.test.insertMany([ - { "_id": 1, "star_rating": 4, "comments": "apple is red" }, - { "_id": 2, "star_rating": 5, "comments": "pie is delicious" }, - { "_id": 3, "star_rating": 3, "comments": "apples, oranges - healthy fruit" }, - { "_id": 4, "star_rating": 2, "comments": "bake the apple pie in the oven" }, - { "_id": 5, "star_rating": 5, "comments": "interesting couch" }, - { "_id": 6, "star_rating": 5, "comments": "interested in couch for sale, year 2022" } - ]); - -**Create text index** - - - db.test.createIndex({ comments: "text" }); - -**Query example** - - - db.test.find({$and: [{star_rating: 5}, {$text: {$search: "interest"}}]}) - -**Output** - - - { "_id" : 5, "star_rating" : 5, "comments" : "interesting couch" } - { "_id" : 6, "star_rating" : 5, "comments" : "interested in couch for sale, year 2022" } - -The command above returns documents with a text-indexed field containing any form of "interest" and a "star_rating" equal to 5. - -## Code examples - -To view a code example for using the `$text` command, choose the tab for the language that you want to use: - -Node.js - - - - const { MongoClient } = require('mongodb'); - - async function searchDocuments() { - 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('test'); - - const result = await collection.find({ - $and: [ - { star_rating: 5 }, - { $text: { $search: 'interest' } } - ] - }).toArray(); - - console.log(result); - client.close(); - } - - searchDocuments(); - -Python - - - - from pymongo import MongoClient - - def search_documents(): - 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.test - - result = list(collection.find({ - '$and': [ - {'star_rating': 5}, - {'$text': {'$search': 'interest'}} - ] - })) - - print(result) - client.close() - - search_documents() - - **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) - -$size - -$type - -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.