After upgrading MongoDB from 5.0 to 6.0 on FreeBSD, I can’t start mongod any more. I get this error in the mongodb log:
{"t":{"$date":"2024-08-19T08:51:32.743+00:00"},"s":"F", "c":"INDEX", "id":28782, "ctx":"initandlisten","msg":"Found an invalid index","attr":{"descriptor":{"v":2,"key":{"title":1},"name":"title_1","collation":{"locale":"en","caseLevel":false,"caseFirst":"off","strength":3,"numericOrdering":false,"alternate":"non-ignorable","maxVariable":"punct","normalization":false,"backwards":false,"version":"57.1"}},"namespace":"graylog.views","error":"IncompatibleCollationVersion: Requested collation version 57.1 but the only available collator version was 74.2. Requested collation spec: { locale: \"en\", caseLevel: false, caseFirst: \"off\", strength: 3, numericOrdering: false, alternate: \"non-ignorable\", maxVariable: \"punct\", normalization: false, backwards: false, version: \"57.1\" }"}}
I assume graylog created the index with the collation version set. It seems I need to either drop and re-create the index with different collation, or dump and import the collection.
Has anyone got the “correct” way to fix it? Should I just drop the index and re-create it, with the same collation, but update the version?