diff options
author | Eddie Louie <eddie.louie@mongodb.com> | 2017-08-01 19:47:26 -0400 |
---|---|---|
committer | Eddie Louie <eddie.louie@mongodb.com> | 2017-08-01 19:47:26 -0400 |
commit | babab967892f81f3107903cb41672503de791998 (patch) | |
tree | 2b5565bde7d88b251911215be7569766a25d5fdd /src/mongo/db/pipeline/document_source.cpp | |
parent | 2a76bd75d75197d3604643ff2b11d0a8f23c14f9 (diff) | |
download | mongo-babab967892f81f3107903cb41672503de791998.tar.gz |
Revert "SERVER-29506 Require $changeNotification to be the first stage."
This reverts commit 2431e1356823d898ef8af16997d6f63b65b385a5.
Diffstat (limited to 'src/mongo/db/pipeline/document_source.cpp')
-rw-r--r-- | src/mongo/db/pipeline/document_source.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp index 6e58adae2bf..9651c7cb8e8 100644 --- a/src/mongo/db/pipeline/document_source.cpp +++ b/src/mongo/db/pipeline/document_source.cpp @@ -164,7 +164,7 @@ Pipeline::SourceContainer::iterator DocumentSource::optimizeAt( Pipeline::SourceContainer::iterator itr, Pipeline::SourceContainer* container) { invariant(*itr == this && (std::next(itr) != container->end())); auto nextMatch = dynamic_cast<DocumentSourceMatch*>((*std::next(itr)).get()); - if (constraints().canSwapWithMatch && nextMatch && !nextMatch->isTextQuery()) { + if (canSwapWithMatch() && nextMatch && !nextMatch->isTextQuery()) { // We're allowed to swap with a $match and the stage after us is a $match. Furthermore, the // $match does not contain a text search predicate, which we do not attempt to optimize // because such a $match must already be the first stage in the pipeline. We can attempt to |