1024programmer Java Mongodb cannot create an index [mongodb tutorial]

Mongodb cannot create an index [mongodb tutorial]


For some reasons, exporting a mongodb The data was then imported to a new database, and an error occurred when re-indexing:

“errmsg” : “exception: WiredTigerIndex::insert: key too large to index, failing 1663 { : “sdfsdffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff dfsdffffffffffffffffffffffffffffffffffffffffff …”, : “EMAIL” }”

Processing method, find the junk data and modify EMAIL to a normal format:

[email protected]_delete

To find this data, use the command:

db.T_User.find(“this.email && this.email.length>60”)

The index can then be created.

This article is from the internet and does not represent1024programmerPosition, please indicate the source when reprinting:https://www.1024programmer.com/734677

author: admin

Previous article
Next article

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact Us

Contact us


Online consultation: QQ交谈

E-mail: [email protected]

Working hours: Monday to Friday, 9:00-17:30, holidays off

Follow wechat
Scan wechat and follow us

Scan wechat and follow us

Follow Weibo
Back to top