I have a mongodb collection with a field that I'm trying to index. It's a string field titled 'title'. There's about 9 million different entries and I'm just trying to get rid of the junk ones.
When I tried indexing it with:
db.getCollection("review_metadata").createIndex({"title" : 1})
I get this error:
db.getCollection("review_metadata").createIndex({"title" : 1})
{
"createdCollectionAutomatically" : false,
"numIndexesBefore" : 2,
"ok" : 0,
"errmsg" : "Btree::insert: key too large to index, failing amazon_reviews.review_metadata.$title_1 1860 { : \"***Super Charger*** Ultra Slim 40W AC Power Adapter Cord for Samsung Notebook/UltraBook : NP300U1A, NP300U1A-A01US, NP305U1A, NP305U1A-A01US, NP305U1A...\" }",
"code" : 17282
}
So, is there a way to search through all of the values in the title field for values that would be too large to index?