AWS Security ChangesHomeSearch

AWS documentdb documentation change

Service: documentdb · 2026-03-28 · Documentation low

File: documentdb/latest/developerguide/indexOfBytes.md

Summary

Entire documentation page for $indexOfBytes operator was removed, including all examples, parameters, and code samples in MongoDB Shell, Node.js, and Python

Security assessment

This change appears to be a routine documentation removal or restructuring. There is no evidence of security vulnerability fixes, security patches, or security-related content being added. The removed content was purely functional documentation about the $indexOfBytes operator usage with no security warnings or security-related context. The removal could be part of documentation reorganization, feature deprecation, or content migration to another location.

Diff

diff --git a/documentdb/latest/developerguide/indexOfBytes.md b/documentdb/latest/developerguide/indexOfBytes.md
index 70f36cb93..8b1378917 100644
--- a//documentdb/latest/developerguide/indexOfBytes.md
+++ b//documentdb/latest/developerguide/indexOfBytes.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#indexOfBytes "Open PDF")
@@ -3,112 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $indexOfBytes
-
-The $indexOfBytes operator in Amazon DocumentDB is used to find the starting index of a substring within a string, based on the byte positions of the characters. This can be useful when working with text data that may contain multi-byte characters, such as those found in non-Latin scripts.
-
-**Parameters**
-
-  * `string`: The input string to search.
-
-  * `substring`: The substring to search for within the input string.
-
-  * `[<start>]`: (optional) The starting position (zero-based) of the search. If not specified, the search starts at the beginning of the string.
-
-
-
-
-## Example (MongoDB Shell)
-
-The following example demonstrates the use of `$indexOfBytes` to find the index of the first hyphen character in a set of strings representing desk locations.
-
-**Create sample documents**
-    
-    
-    db.people.insertMany([
-      { "_id": 1, "Desk": "Düsseldorf-BVV-021" },
-      { "_id": 2, "Desk": "Munich-HGG-32a" },
-      { "_id": 3, "Desk": "Cologne-ayu-892.50" },
-      { "_id": 4, "Desk": "Dortmund-Hop-78" }
-    ]);
-
-**Query example**
-    
-    
-    db.people.aggregate([
-      { $project: { stateLocation: { $indexOfBytes: ["$Desk", "-"] } } }
-    ]);
-
-**Output**
-    
-    
-    { "_id" : 1, "stateLocation" : 11 }
-    { "_id" : 2, "stateLocation" : 6 }
-    { "_id" : 3, "stateLocation" : 7 }
-    { "_id" : 4, "stateLocation" : 8 }
-
-## Code examples
-
-To view a code example for using the `$indexOfBytes` command, 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 events = db.collection('people');
-    
-      const result = await db.collection('people').aggregate([
-        { $project: { stateLocation: { $indexOfBytes: ["$Desk", "-"] } } }
-      ]).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['people']
-        
-        result = list(db.people.aggregate([
-            { '$project': { 'stateLocation': { '$indexOfBytes': ['$Desk', '-'] } } }
-        ]))
-        print(result)
-        client.close()
-    
-    example()
-
-![Warning](https://d1ge0kk1l5kms0.cloudfront.net/images/G/01/webservices/console/warning.png) **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)
-
-$indexOfArray
-
-$indexOfCP
-
-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.