diff options
Diffstat (limited to 'src/mongo/db/query/planner_ixselect.cpp')
-rw-r--r-- | src/mongo/db/query/planner_ixselect.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/mongo/db/query/planner_ixselect.cpp b/src/mongo/db/query/planner_ixselect.cpp index e228153bb72..2f390eec1f0 100644 --- a/src/mongo/db/query/planner_ixselect.cpp +++ b/src/mongo/db/query/planner_ixselect.cpp @@ -185,14 +185,11 @@ static double fieldWithDefault(const BSONObj& infoObj, const string& name, doubl * 2d indices don't handle wrapping so we can't use them for queries that wrap. */ static bool twoDWontWrap(const Circle& circle, const IndexEntry& index) { - GeoHashConverter::Parameters hashParams; - Status paramStatus = GeoHashConverter::parseParameters(index.infoObj, &hashParams); - verify(paramStatus.isOK()); // we validated the params on index creation - - GeoHashConverter conv(hashParams); + auto conv = GeoHashConverter::createFromDoc(index.infoObj); + uassertStatusOK(conv.getStatus()); // We validated the parameters when creating the index. // FYI: old code used flat not spherical error. - double yscandist = rad2deg(circle.radius) + conv.getErrorSphere(); + double yscandist = rad2deg(circle.radius) + conv.getValue()->getErrorSphere(); double xscandist = computeXScanDistance(circle.center.y, yscandist); bool ret = circle.center.x + xscandist < 180 && circle.center.x - xscandist > -180 && circle.center.y + yscandist < 90 && circle.center.y - yscandist > -90; |