diff options
author | Sam Kleinman <samk@10gen.com> | 2015-04-01 11:58:54 -0400 |
---|---|---|
committer | Ramon Fernandez <ramon.fernandez@mongodb.com> | 2015-04-20 14:06:34 -0400 |
commit | c62eee2f4cc7a98f33ac81b7d21c2e94bebf2d55 (patch) | |
tree | 152b660ae3260b54f0256c5fb46f6011c47f9e87 | |
parent | d139a70ce0142cc1cc01f699a6006d2b2d695346 (diff) | |
download | mongo-c62eee2f4cc7a98f33ac81b7d21c2e94bebf2d55.tar.gz |
SERVER-17835: geoNear pipeline stage no longer needs to specify uniqueDocs
(cherry picked from commit e42605bba71b9fc99b9ce275f46302df98f82670)
-rw-r--r-- | src/mongo/db/pipeline/document_source.h | 1 | ||||
-rw-r--r-- | src/mongo/db/pipeline/document_source_geo_near.cpp | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/mongo/db/pipeline/document_source.h b/src/mongo/db/pipeline/document_source.h index cb838d55929..607fca9dc7a 100644 --- a/src/mongo/db/pipeline/document_source.h +++ b/src/mongo/db/pipeline/document_source.h @@ -1102,7 +1102,6 @@ namespace mongo { bool spherical; double distanceMultiplier; boost::scoped_ptr<FieldPath> includeLocs; - bool uniqueDocs; // these fields are used while processing the results BSONObj cmdOutput; diff --git a/src/mongo/db/pipeline/document_source_geo_near.cpp b/src/mongo/db/pipeline/document_source_geo_near.cpp index 87b67c036a7..db1abf3d7ea 100644 --- a/src/mongo/db/pipeline/document_source_geo_near.cpp +++ b/src/mongo/db/pipeline/document_source_geo_near.cpp @@ -108,8 +108,6 @@ namespace mongo { if (includeLocs) result.setField("includeLocs", Value(includeLocs->getPath(false))); - result.setField("uniqueDocs", Value(uniqueDocs)); - return Value(DOC(getSourceName() << result.freeze())); } @@ -140,8 +138,6 @@ namespace mongo { if (includeLocs) geoNear.append("includeLocs", true); // String in toBson - geoNear.append("uniqueDocs", uniqueDocs); - return geoNear.obj(); } @@ -208,7 +204,8 @@ namespace mongo { includeLocs.reset(new FieldPath(options["includeLocs"].str())); } - uniqueDocs = options["uniqueDocs"].trueValue(); + if (options.hasField("uniqueDocs")) + warning() << "ignoring deprecated uniqueDocs option in $geoNear aggregation stage"; } DocumentSourceGeoNear::DocumentSourceGeoNear(const intrusive_ptr<ExpressionContext> &pExpCtx) @@ -218,6 +215,5 @@ namespace mongo { , maxDistance(-1.0) , spherical(false) , distanceMultiplier(1.0) - , uniqueDocs(true) {} } |