summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-27 16:44:39 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-27 16:44:39 -0500
commitad0bc93a2901c0ddf5e6ad302cf55077cfed924b (patch)
treeb95ae67b2bb928730f818458cc92fc7cd4e1f381 /db
parentdcb98b613dcba31a8f80ad0cbad894a623d75ae4 (diff)
parent669b2f2dd36b11e17ae4ab21c2fdfec958ac72b9 (diff)
downloadmongo-ad0bc93a2901c0ddf5e6ad302cf55077cfed924b.tar.gz
Merge branch 'master' of github.com:mongodb/mongo
Diffstat (limited to 'db')
-rw-r--r--db/geo/2d.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/geo/2d.cpp b/db/geo/2d.cpp
index 3102b8a3469..1730d14be58 100644
--- a/db/geo/2d.cpp
+++ b/db/geo/2d.cpp
@@ -929,8 +929,8 @@ namespace mongo {
// 2
double farthest = hopper->farthest();
GEODEBUGPRINT(hopper->farthest());
- if (farthest == -1) {
- // Nothing found in Phase 1
+ if (hopper->found() < _numWanted) {
+ // Not enough found in Phase 1
farthest = _scanDistance;
}
else if (_type == GEO_SPHERE) {