summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/expression_index.cpp
diff options
context:
space:
mode:
authorKevin Albertson <kevin.albertson@10gen.com>2015-06-11 10:30:46 -0400
committerKevin Albertson <kevin.albertson@10gen.com>2015-07-17 12:07:32 -0400
commitc33f68518b06e6b98596a8133d097e75d8431293 (patch)
tree49757af46288b63155e554f5bcc64b026ef494f4 /src/mongo/db/query/expression_index.cpp
parent0db35ed67ac5c22969cc674a43bf741f85cd9bdc (diff)
downloadmongo-c33f68518b06e6b98596a8133d097e75d8431293.tar.gz
SERVER-19097 Add version 3 to 2dsphere index
Diffstat (limited to 'src/mongo/db/query/expression_index.cpp')
-rw-r--r--src/mongo/db/query/expression_index.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/mongo/db/query/expression_index.cpp b/src/mongo/db/query/expression_index.cpp
index 67f06314266..7f86c374a90 100644
--- a/src/mongo/db/query/expression_index.cpp
+++ b/src/mongo/db/query/expression_index.cpp
@@ -92,18 +92,10 @@ void ExpressionMapping::cover2d(const R2Region& region,
}
}
-// TODO: what should we really pass in for indexInfoObj?
void ExpressionMapping::cover2dsphere(const S2Region& region,
- const BSONObj& indexInfoObj,
+ const S2IndexingParams& indexingParams,
OrderedIntervalList* oilOut) {
- int coarsestIndexedLevel;
- BSONElement ce = indexInfoObj["coarsestIndexedLevel"];
- if (ce.isNumber()) {
- coarsestIndexedLevel = ce.numberInt();
- } else {
- coarsestIndexedLevel = S2::kAvgEdge.GetClosestLevel(100 * 1000.0 / kRadiusOfEarthInMeters);
- }
-
+ int coarsestIndexedLevel = indexingParams.coarsestIndexedLevel;
// The min level of our covering is the level whose cells are the closest match to the
// *area* of the region (or the max indexed level, whichever is smaller) The max level
// is 4 sizes larger.