Skip to content

Commit a6a41d6

Browse files
committed
do not use BSON compressed subtype, use generic instead
1 parent a6d207a commit a6a41d6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/UnidocRecords/Search/Unidoc.TextResource.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ extension Unidoc.TextResource:BSONDocumentEncodable, BSONEncodable
6060
case .gzip(let gzip):
6161
bson[.hash] = MD5.init(hashing: gzip)
6262
bson[.gzip] = BSON.BinaryView<ArraySlice<UInt8>>.init(
63-
subtype: .compressed,
63+
// Do NOT use `compressed` here. That has a special meaning to MongoDB,
64+
// and newer versions of `mongod` will reject it.
65+
subtype: .generic,
6466
bytes: gzip)
6567
}
6668
}

0 commit comments

Comments
 (0)