diff --git a/source/reference/operator/centerSphere.txt b/source/reference/operator/centerSphere.txt index 9afc27f9185..041a3cc9c87 100644 --- a/source/reference/operator/centerSphere.txt +++ b/source/reference/operator/centerSphere.txt @@ -17,7 +17,7 @@ $centerSphere .. code-block:: javascript - db.collection.find( { loc: { $centerSphere: { [0,0], 10 / 3959 } } } ) + db.collection.find( { loc: { $within: { $centerSphere: { [0,0], 10 / 3959 } } } } ) This query will return all documents within a 10 mile radius of ``[0,0]`` using a spherical geometry to calculate distances.