error in monogdb “errmsg” : "WiredTigerIndex::insert: key too large to index, failing
问题 I'm creating a index in mongo: db.table.createIndex({"chr" : 1, "Start" : 1, "End" : 1, "Ref" : 1, "Alt" : 1}) It runs for some time and gives an error msg: error in monogdb "errmsg" : "WiredTigerIndex::insert: key too large to index, failing How do I fix this error? 回答1: In MongoDB, since 2.6, the total size of an index entry must be less than 1024 bytes. Documentation here In other terms, at least one of your documents has a large value in one of the field you are trying to index. It's not