From ba78161502e7874dbc1fcb35fa801f18b060d554 Mon Sep 17 00:00:00 2001 From: dlouwers Date: Mon, 7 Jan 2013 13:49:42 +0100 Subject: [PATCH] Update source/reference/operator/centerSphere.txt Code didn't use $within which results in an error. --- source/reference/operator/centerSphere.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.