summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPawel Terlecki <pawel.terlecki@mongodb.com>2019-05-21 19:12:27 -0400
committerPawel Terlecki <pawel.terlecki@mongodb.com>2019-05-23 11:51:29 -0400
commitfedc4754c04d71434fb7901d83e2947aeaeabe77 (patch)
tree9e37b3c9cd9d215a2c8871036aea3f75f0f1c014
parente35e202e414df3f917ff26937f5e8325cce56b1e (diff)
downloadmongo-fedc4754c04d71434fb7901d83e2947aeaeabe77.tar.gz
SERVER-40941 [FLE] Add setQuery to DocumentSourceGeoNear
This is required to add translation for $geoNear.
-rw-r--r--src/mongo/db/pipeline/document_source_geo_near.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mongo/db/pipeline/document_source_geo_near.h b/src/mongo/db/pipeline/document_source_geo_near.h
index 9f9e94ef5e2..7c84ff79d18 100644
--- a/src/mongo/db/pipeline/document_source_geo_near.h
+++ b/src/mongo/db/pipeline/document_source_geo_near.h
@@ -81,6 +81,13 @@ public:
};
/**
+ * Set the query predicate to apply to the documents in addition to the "near" predicate.
+ */
+ void setQuery(BSONObj newQuery) {
+ query = newQuery.getOwned();
+ };
+
+ /**
* The field in which the computed distance will be stored.
*/
FieldPath getDistanceField() const {