summaryrefslogtreecommitdiff
path: root/src/mongo/db/global_index.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/global_index.cpp')
-rw-r--r--src/mongo/db/global_index.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/global_index.cpp b/src/mongo/db/global_index.cpp
index cbe1d527d61..13852a11eda 100644
--- a/src/mongo/db/global_index.cpp
+++ b/src/mongo/db/global_index.cpp
@@ -63,7 +63,7 @@ BSONObj buildIndexEntry(const BSONObj& key, const BSONObj& docKey) {
// - No support for multikey indexes.
KeyString::Builder ks(KeyString::Version::V1);
- ks.resetToKey(key, KeyString::ALL_ASCENDING);
+ ks.resetToKey(BSONObj::stripFieldNames(key), KeyString::ALL_ASCENDING);
const auto& indexTB = ks.getTypeBits();
// Build the index entry, consisting of: