AWS Security ChangesHomeSearch

AWS documentdb documentation change

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

File: documentdb/latest/developerguide/indexOfCP.md

Summary

Entire documentation page for the $indexOfCP operator was removed, including all content, examples, and code samples.

Security assessment

This change removes documentation for a specific MongoDB operator ($indexOfCP) but does not indicate any security vulnerability, weakness, or incident. The removal appears to be part of documentation restructuring or deprecation of content, not security-related. No security implications are evident from the removed content.

Diff

diff --git a/documentdb/latest/developerguide/indexOfCP.md b/documentdb/latest/developerguide/indexOfCP.md
index f512371f9..8b1378917 100644
--- a//documentdb/latest/developerguide/indexOfCP.md
+++ b//documentdb/latest/developerguide/indexOfCP.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#indexOfCP "Open PDF")
@@ -3,113 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $indexOfCP
-
-The `$indexOfCP` operator in Amazon DocumentDB is used to find the index, in code points (CP), of the first occurrence of a specified substring within a string expression. This can be useful when parsing and extracting content from string fields.
-
-**Parameters**
-
-  * `string expression`: The string to search.
-
-  * `substring`: The substring to search for.
-
-  * `[<start>]`: (optional) The position to start the search (zero-based index). Default is 0.
-
-
-
-
-## Example (MongoDB Shell)
-
-In this example, we use the `$indexOfCP` operator to find the index of the first occurrence of the hyphen character - in the Desk field of each document.
-
-**Create sample documents**
-    
-    
-    db.people.insertMany([
-      { "_id":1, "name":"John Doe", "Manager":"Jane Doe", "Role":"Developer", "Desk": "Düsseldorf-BVV-021"},
-      { "_id":2, "name":"John Stiles", "Manager":"Jane Doe", "Role":"Manager", "Desk": "Munich-HGG-32a"},
-      { "_id":3, "name":"Richard Roe", "Manager":"Jorge Souza", "Role":"Product", "Desk": "Cologne-ayu-892.50"},
-      { "_id":4, "name":"Mary Major", "Manager":"Jane Doe", "Role":"Solution Architect", "Desk": "Dortmund-Hop-78"}
-    ])
-
-**Query example**
-    
-    
-    db.people.aggregate([
-      { $project: { stateLocation: { $indexOfCP: [ "$Desk", "-"] } } }
-    ])
-
-**Output**
-    
-    
-    { "_id" : 1, "stateLocation" : 10 }
-    { "_id" : 2, "stateLocation" : 6 }
-    { "_id" : 3, "stateLocation" : 7 }
-    { "_id" : 4, "stateLocation" : 8 }
-
-## Code examples
-
-To view a code example for using the `$indexOfCP` 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 collection = db.collection('people');
-    
-      const result = await collection.aggregate([
-        { $project: { stateLocation: { $indexOfCP: [ "$Desk", "-"] } } }
-      ]).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']
-    collection = db['people']
-    
-    result = list(collection.aggregate([
-        { '$project': { 'stateLocation': { '$indexOfCP': [ '$Desk', '-' ] } } }
-    ]))
-    
-    print(result)
-    
-    client.close()
-
-![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)
-
-$indexOfBytes
-
-$indexStats
-
-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.