diff options
Diffstat (limited to 'src/mongo/db/matcher/expression_parser_geo.cpp')
-rw-r--r-- | src/mongo/db/matcher/expression_parser_geo.cpp | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/src/mongo/db/matcher/expression_parser_geo.cpp b/src/mongo/db/matcher/expression_parser_geo.cpp index d706ef65193..433af63ed3d 100644 --- a/src/mongo/db/matcher/expression_parser_geo.cpp +++ b/src/mongo/db/matcher/expression_parser_geo.cpp @@ -53,12 +53,7 @@ StatusWithMatchExpression expressionParserGeoCallbackReal(const char* name, unique_ptr<GeoMatchExpression> e = make_unique<GeoMatchExpression>(); - // Until the index layer accepts non-BSON predicates, or special indices are moved into - // stages, we have to clean up the raw object so it can be passed down to the index - // layer. - BSONObjBuilder bob; - bob.append(name, section); - Status s = e->init(name, gq.release(), bob.obj()); + Status s = e->init(name, gq.release(), section); if (!s.isOK()) return StatusWithMatchExpression(s); return {std::move(e)}; @@ -70,12 +65,7 @@ StatusWithMatchExpression expressionParserGeoCallbackReal(const char* name, return StatusWithMatchExpression(s); } unique_ptr<GeoNearMatchExpression> e = make_unique<GeoNearMatchExpression>(); - // Until the index layer accepts non-BSON predicates, or special indices are moved into - // stages, we have to clean up the raw object so it can be passed down to the index - // layer. - BSONObjBuilder bob; - bob.append(name, section); - s = e->init(name, nq.release(), bob.obj()); + s = e->init(name, nq.release(), section); if (!s.isOK()) return StatusWithMatchExpression(s); return {std::move(e)}; |