AWS Security ChangesHomeSearch

AWS documentdb documentation change

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

File: documentdb/latest/developerguide/geoNear.md

Summary

Removed entire documentation content for the $geoNear aggregation stage, including examples, parameters, and code samples in multiple programming languages.

Security assessment

This change removes documentation content entirely without any indication of security vulnerabilities or security-related updates. The removed content was purely functional documentation about the $geoNear aggregation operator with example usage. There is no evidence in the diff of security fixes, vulnerability disclosures, or security feature additions.

Diff

diff --git a/documentdb/latest/developerguide/geoNear.md b/documentdb/latest/developerguide/geoNear.md
index a2b12721b..8b1378917 100644
--- a//documentdb/latest/developerguide/geoNear.md
+++ b//documentdb/latest/developerguide/geoNear.md
@@ -1 +0,0 @@
-[](/pdfs/documentdb/latest/developerguide/developerguide.pdf#geoNear "Open PDF")
@@ -3,144 +1,0 @@
-[Documentation](/index.html)[Amazon DocumentDB](/documentdb/index.html)[Developer Guide](what-is.html)
-
-Example (MongoDB Shell)Code examples
-
-# $geoNear
-
-The `$geoNear` aggregation stage returns documents in order of proximity to a specified point. It calculates the distance from the point and includes the distance in the output documents.
-
-**Parameters**
-
-  * `near`: The point from which to calculate distances, specified as GeoJSON or legacy coordinates.
-
-  * `distanceField`: The field name to store the calculated distance.
-
-  * `spherical`: Boolean indicating whether to use spherical geometry (required for GeoJSON points).
-
-  * `maxDistance`: Optional. Maximum distance from the center point.
-
-  * `minDistance`: Optional. Minimum distance from the center point.
-
-  * `query`: Optional. Additional filter criteria to apply.
-
-  * `limit`: Optional. Maximum number of documents to return.
-
-  * `key`: Optional. Field to use for geospatial query when multiple geospatial indexes exist.
-
-
-
-
-## Example (MongoDB Shell)
-
-The following example demonstrates using the `$geoNear` stage to find stores nearest to a given location.
-
-**Create sample documents**
-    
-    
-    db.stores.createIndex({ location: "2dsphere" });
-    
-    db.stores.insertMany([
-      { _id: 1, name: "Store A", location: { type: "Point", coordinates: [-122.4, 37.8] } },
-      { _id: 2, name: "Store B", location: { type: "Point", coordinates: [-122.5, 37.7] } },
-      { _id: 3, name: "Store C", location: { type: "Point", coordinates: [-122.3, 37.9] } }
-    ]);
-
-**Query example**
-    
-    
-    db.stores.aggregate([
-      {
-        $geoNear: {
-          near: { type: "Point", coordinates: [-122.4, 37.8] },
-          distanceField: "distance",
-          spherical: true
-        }
-      }
-    ]);
-
-**Output**
-    
-    
-    [
-      { _id: 1, name: 'Store A', location: { type: 'Point', coordinates: [ -122.4, 37.8 ] }, distance: 0 },
-      { _id: 3, name: 'Store C', location: { type: 'Point', coordinates: [ -122.3, 37.9 ] }, distance: 13877.82 },
-      { _id: 2, name: 'Store B', location: { type: 'Point', coordinates: [ -122.5, 37.7 ] }, distance: 15557.89 }
-    ]
-
-## Code examples
-
-To view a code example for using the `$geoNear` aggregation stage, 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 collection = db.collection('stores');
-    
-      const result = await collection.aggregate([
-        {
-          $geoNear: {
-            near: { type: "Point", coordinates: [-122.4, 37.8] },
-            distanceField: "distance",
-            spherical: true
-          }
-        }
-      ]).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['stores']
-    
-        result = list(collection.aggregate([
-            {
-                '$geoNear': {
-                    'near': { 'type': 'Point', 'coordinates': [-122.4, 37.8] },
-                    'distanceField': 'distance',
-                    'spherical': True
-                }
-            }
-        ]))
-    
-        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)
-
-$floor
-
-$group
-
-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.