From db1aa30dd6af52f1c92b593b8e72f02282254589 Mon Sep 17 00:00:00 2001 From: Alexander Sviridov Date: Thu, 11 Apr 2013 18:39:06 +0400 Subject: [PATCH] Update near.txt $maxDistance inside $geometry clause looks like mistake doesn't work for me as well - I'm getting this all the time: {"error":"point not in interval of [ -180, 180 ] :: caused by :: { 0: 0.0, 1: 100000.0 }"} --- source/reference/operator/near.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/reference/operator/near.txt b/source/reference/operator/near.txt index 9c8a990d69a..b2d6596f9b9 100644 --- a/source/reference/operator/near.txt +++ b/source/reference/operator/near.txt @@ -33,9 +33,9 @@ $near { $near : { $geometry : { type : "Point" , - coordinates : [ , ] } , + coordinates : [ , ] } }, $maxDistance : - } } } ) + } } ) .. important:: Specify coordinates in this order: **"longitude, latitude."** @@ -48,9 +48,9 @@ $near db.places.find( { loc : { $near : { $geometry : { type : "Point" , - coordinates: [ 40 , 5 ] } , + coordinates: [ 40 , 5 ] } }, $maxDistance : 100 - } } } ) + } } ) For queries on legacy coordinate pairs, use the following syntax: