summaryrefslogtreecommitdiff
path: root/src/mongo/db/matcher
diff options
context:
space:
mode:
authorsamontea <merciers.merciers@gmail.com>2021-09-03 03:47:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-09-03 04:11:52 +0000
commit8073eb74318bc75a69a98491eebd647f9cde0f55 (patch)
treed59c76a75f55d06d6b42ae20338c8f475e3d9e60 /src/mongo/db/matcher
parentaec3ea814683689780a122a4b95c8b23794e59e7 (diff)
downloadmongo-8073eb74318bc75a69a98491eebd647f9cde0f55.tar.gz
SERVER-58371 Allow $_internalBucketGeoWithin to scan 'bucket-2dsphere' index
Diffstat (limited to 'src/mongo/db/matcher')
-rw-r--r--src/mongo/db/matcher/expression_internal_bucket_geo_within.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/mongo/db/matcher/expression_internal_bucket_geo_within.h b/src/mongo/db/matcher/expression_internal_bucket_geo_within.h
index 0afb5736247..c0b77d7fbc8 100644
--- a/src/mongo/db/matcher/expression_internal_bucket_geo_within.h
+++ b/src/mongo/db/matcher/expression_internal_bucket_geo_within.h
@@ -69,7 +69,8 @@ public:
clonable_ptr<ErrorAnnotation> annotation = nullptr)
: MatchExpression(MatchExpression::INTERNAL_BUCKET_GEO_WITHIN, std::move(annotation)),
_geoContainer(container),
- _field(field) {}
+ _indexField("data." + field),
+ _field(std::move(field)) {}
void debugString(StringBuilder& debug, int indentationLevel) const final;
@@ -116,6 +117,15 @@ public:
return _geoContainer;
}
+ const StringData path() const final {
+ return _indexField;
+ }
+
+ const FieldRef* fieldRef() const final {
+ MONGO_UNREACHABLE_TASSERT(5837104);
+ return nullptr;
+ }
+
void acceptVisitor(MatchExpressionMutableVisitor* visitor) final {
visitor->visit(this);
}
@@ -139,6 +149,7 @@ private:
}
std::shared_ptr<GeometryContainer> _geoContainer;
+ std::string _indexField;
std::string _field;
};