summaryrefslogtreecommitdiff
path: root/src/mongo/db/query/cqf_command_utils.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/query/cqf_command_utils.cpp')
-rw-r--r--src/mongo/db/query/cqf_command_utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/query/cqf_command_utils.cpp b/src/mongo/db/query/cqf_command_utils.cpp
index 8863a22adde..98e3ec34a13 100644
--- a/src/mongo/db/query/cqf_command_utils.cpp
+++ b/src/mongo/db/query/cqf_command_utils.cpp
@@ -737,7 +737,7 @@ bool isEligibleForBonsai(const CanonicalQuery& cq,
!request.getReadOnce() && !request.getShowRecordId() && !request.getTerm();
// Early return to avoid unnecessary work of walking the input expression.
- if (!commandOptionsEligible) {
+ if (!commandOptionsEligible || !cq.useCqfIfEligible()) {
return false;
}