summaryrefslogtreecommitdiff
path: root/src/mongo/db/commands/index_filter_commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/commands/index_filter_commands.cpp')
-rw-r--r--src/mongo/db/commands/index_filter_commands.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/mongo/db/commands/index_filter_commands.cpp b/src/mongo/db/commands/index_filter_commands.cpp
index c9a82127980..286b3595056 100644
--- a/src/mongo/db/commands/index_filter_commands.cpp
+++ b/src/mongo/db/commands/index_filter_commands.cpp
@@ -303,15 +303,16 @@ Status ClearFilters::clear(OperationContext* opCtx,
AllowedIndexEntry entry = *i;
// Create canonical query.
- auto qr = std::make_unique<QueryRequest>(nss);
- qr->setFilter(entry.query);
- qr->setSort(entry.sort);
- qr->setProj(entry.projection);
- qr->setCollation(entry.collation);
+ auto findCommand = std::make_unique<FindCommand>(nss);
+ findCommand->setFilter(entry.query);
+ findCommand->setSort(entry.sort);
+ findCommand->setProjection(entry.projection);
+ findCommand->setCollation(entry.collation);
const boost::intrusive_ptr<ExpressionContext> expCtx;
auto statusWithCQ =
CanonicalQuery::canonicalize(opCtx,
- std::move(qr),
+ std::move(findCommand),
+ false,
expCtx,
extensionsCallback,
MatchExpressionParser::kAllowAllSpecialFeatures);