@nono-lqdn The error message is showing you which key is causing the violation, in this case it is analytics:pageviews:byCid:32 you need to delete that and try the createIndex command again until you no longer get errors and the index is created successfully. Do this when the forum is not running so you don't get more invalid keys.
> db.objects.createIndex({ _key: 1, value: -1 }, { background: true, unique: true, sparse: true });
{
"ok" : 0,
"errmsg" : "E11000 duplicate key error collection: fotepo.objects index: _key_1_value_-1 dup key: { _key: \"analytics:pageviews:byCid:32\", value: \"1726783200000\" }",
"code" : 11000,
"codeName" : "DuplicateKey",
"keyPattern" : {
"_key" : 1,
"value" : -1
},
"keyValue" : {
"_key" : "analytics:pageviews:byCid:32",
"value" : "1726783200000"
}
}