summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/pipeline.h
diff options
context:
space:
mode:
authorMihai Andrei <mihai.andrei@10gen.com>2022-05-13 16:06:26 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-05-13 16:47:23 +0000
commitd3d37be21fdac8e773c30db8ba542bbf7d9f5f4f (patch)
treedb1df683e19caa1838e01f6ffb285418592fe8e6 /src/mongo/db/pipeline/pipeline.h
parent1d4d6b6f83b4c4e1a96802fffe89b9399f89e3b3 (diff)
downloadmongo-d3d37be21fdac8e773c30db8ba542bbf7d9f5f4f.tar.gz
SERVER-66354 Additional $search metadata pipeline should use separate ExpressionContext
Diffstat (limited to 'src/mongo/db/pipeline/pipeline.h')
-rw-r--r--src/mongo/db/pipeline/pipeline.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/pipeline.h b/src/mongo/db/pipeline/pipeline.h
index 8784ad262c3..96cf6426be3 100644
--- a/src/mongo/db/pipeline/pipeline.h
+++ b/src/mongo/db/pipeline/pipeline.h
@@ -177,7 +177,12 @@ public:
std::vector<BSONObj> currentPipeline,
MakePipelineOptions opts);
- std::unique_ptr<Pipeline, PipelineDeleter> clone() const;
+ /**
+ * Callers can optionally specify 'newExpCtx' to construct the deep clone with it. This will be
+ * used to construct all the cloned DocumentSources as well.
+ */
+ std::unique_ptr<Pipeline, PipelineDeleter> clone(
+ const boost::intrusive_ptr<ExpressionContext>& = nullptr) const;
const boost::intrusive_ptr<ExpressionContext>& getContext() const {
return pCtx;