خرید بک لینک

Vote count: 0

I have a MongoDB collection.

I want to change the indexing, to have a dual index, rather than a single.

So I ran:

db.allnews.ensureIndex( { "url": 1, "source": 1 }, { unique: true } )

But then I get the error:

exception: WiredTigerIndex::insert: key too large to index

And the limit is 1024 bytes

So what is the solution...?

(1) Ignore it somehow.. somehow skip these records that are too long, without stopping the entire process..?

--setParameter failIndexKeyTooLong=false

?? Could this do the trick..?

(2) Find the records that are too long, through some sort of query, and shorten them..?

(3) Something else..?

Thanks

asked 34 secs ago

برچسب: نویسنده: استخدام کار تاريخ: يکشنبه 17 مرداد 1395 ساعت: 22:16

صفحه بندی