diff options
author | James Wahlin <james.wahlin@10gen.com> | 2017-01-24 16:48:31 -0500 |
---|---|---|
committer | James Wahlin <james.wahlin@10gen.com> | 2017-02-03 08:26:50 -0500 |
commit | 529adf30a88770c44b8dea31323f114975dfd78b (patch) | |
tree | dc18ec945b950a410d7e9d235b3de67587af6d34 /src/mongo/db/views | |
parent | 47da0b53f9cd27aeec1d2822780784866269a47d (diff) | |
download | mongo-529adf30a88770c44b8dea31323f114975dfd78b.tar.gz |
SERVER-27848 Add index hint to aggregation and non-materialized views
Diffstat (limited to 'src/mongo/db/views')
-rw-r--r-- | src/mongo/db/views/resolved_view.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/views/resolved_view.cpp b/src/mongo/db/views/resolved_view.cpp index c5d955a08d1..5fcdecc857e 100644 --- a/src/mongo/db/views/resolved_view.cpp +++ b/src/mongo/db/views/resolved_view.cpp @@ -91,6 +91,10 @@ StatusWith<BSONObj> ResolvedView::asExpandedViewAggregation( batchSizeBuilder.doneFast(); } + if (!request.getHint().isEmpty()) { + aggregationBuilder.append(AggregationRequest::kHintName, request.getHint()); + } + if (request.shouldBypassDocumentValidation()) { aggregationBuilder.append("bypassDocumentValidation", true); } |