summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/text.cpp
diff options
context:
space:
mode:
authoryarai <yuta.arai@10gen.com>2018-10-02 13:06:27 -0400
committeryarai <yuta.arai@10gen.com>2018-10-15 11:44:17 -0400
commite62512d50329877c84a7b2404c8c6158479efede (patch)
treeb22562f7b861997c3619fd96bfeede2480cf6a43 /src/mongo/db/exec/text.cpp
parente5c39e225effd4a28937c32c84ac3dc0c1ceb355 (diff)
downloadmongo-e62512d50329877c84a7b2404c8c6158479efede.tar.gz
SERVER-37417 Plans using $** wildcard indices can return duplicate results
Diffstat (limited to 'src/mongo/db/exec/text.cpp')
-rw-r--r--src/mongo/db/exec/text.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/exec/text.cpp b/src/mongo/db/exec/text.cpp
index 2c9e0f4ba81..89a937eddbc 100644
--- a/src/mongo/db/exec/text.cpp
+++ b/src/mongo/db/exec/text.cpp
@@ -109,6 +109,7 @@ unique_ptr<PlanStage> TextStage::buildTextTree(OperationContext* opCtx,
ixparams.bounds.boundInclusion = BoundInclusion::kIncludeBothStartAndEndKeys;
ixparams.bounds.isSimpleRange = true;
ixparams.direction = -1;
+ ixparams.shouldDedup = _params.index->isMultikey(opCtx);
indexScanList.push_back(stdx::make_unique<IndexScan>(opCtx, ixparams, ws, nullptr));
}