[SERVER-12002] $maxDistance with 2dsphere index doesn't handle distances less than 10e-10 Created: 06/Dec/13  Updated: 11/Jul/16  Resolved: 19/Dec/13

Status: Closed
Project: Core Server
Component/s: Geo
Affects Version/s: 2.4.8
Fix Version/s: 2.5.5

Type: Bug Priority: Major - P3
Reporter: Luke Lovett Assignee: Unassigned
Resolution: Done Votes: 0
Labels: 26qa, nqf
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

> db.serverBuildInfo()
{
"version" : "2.4.9-pre-",
"gitVersion" : "5779b6e198c0dd22a99e12837faea4b5e8b2664f",
"sysInfo" : "Darwin bs-osx-106-x86-64-2.10gen.cc 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:32:41 PDT 2011; root:xnu-1504.15.3~1/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
"loaderFlags" : "-fPIC -pthread -rdynamic -m64",
"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -O3 -m64",
"allocator" : "system",
"versionArray" : [
2,
4,
9,
-100
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}
and
> db.serverBuildInfo()
{
"version" : "2.5.5-pre-",
"gitVersion" : "7816de1dbc43f93c06cfeb28ab5f7d65009e8372",
"OpenSSLVersion" : "",
"sysInfo" : "Darwin llmac 13.0.0 Darwin Kernel Version 13.0.0: Thu Sep 19 22:22:27 PDT 2013; root:xnu-2422.1.72~6/RELEASE_X86_64 x86_64 BOOST_LIB_VERSION=1_49",
"loaderFlags" : "-fPIC -pthread -Wl,-bind_at_load -mmacosx-version-min=10.6",
"compilerFlags" : "-Wnon-virtual-dtor -Woverloaded-virtual -fPIC -fno-strict-aliasing -ggdb -pthread -Wall -Wsign-compare -Wno-unknown-pragmas -Winvalid-pch -Werror -pipe -O3 -Wno-unused-function -Wno-unused-private-field -Wno-mismatched-tags -Wno-deprecated-declarations -Wno-tautological-constant-out-of-range-compare -mmacosx-version-min=10.6",
"allocator" : "tcmalloc",
"versionArray" : [
2,
5,
5,
-100
],
"javascriptEngine" : "V8",
"bits" : 64,
"debug" : false,
"maxBsonObjectSize" : 16777216,
"ok" : 1
}


Issue Links:
Related
Operating System: ALL
Steps To Reproduce:

2.4.9-pre-

> db.c.insert({loc:[0,0]})
> db.c.ensureIndex({loc:"2dsphere"})
> db.c.find({loc:{$nearSphere:[0,0],$maxDistance:10e-100}})
>

2.5.5-pre-

> db.c.insert({loc:[0,0]})
Insert WriteResult({ "ok" : 1, "n" : 1 })
> db.c.ensureIndex({loc:"2dsphere"})
> db.c.find({loc:{$nearSphere:[0,0],$maxDistance:10e-100}})
{ "_id" : ObjectId("52a264079ff3a7c681503c83"), "loc" : [ 0, 0 ] }

Participants:
Generated at Thu Feb 08 03:27:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.