2

I'm trying to create an index and I'm getting this error:

2018-12-30T15:28:30.853-0800 I COMMAND [conn580067] command db.$cmd command: createIndexes { createIndexes: "node", indexes: [ { background: true, sparse: true, key: { type: 1, players: 1, ct: 1, image: 1, domain: 1 }, name: "browse" } ], writeConcern: {} } exception: WiredTigerIndex::insert: key too large to index, failing 5813 { : "card", : null, : 1390347921368.0, : "/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxISEBIUEhQVFhQQEBAQDxAVFA8UFBUQFBQWFxQRFBQYHCggGBolHBQUITEhJSkrLi4uFx8zODMsNygtLisBCgoKDg0NFBAQFywcHBwsLCwsLCwsLC...", : null } code:17280 numYields:3312 reslen:354 locks:{ Global: { acquireCount: { r: 3313, w: 3313 } }, Database: { acquireCount: { w: 3313, W: 2 } }, Collection: { acquireCount: { w: 3313 } }, Metadata: { acquireCount: { W: 1 } } } protocol:op_query 8206ms

How do I figure out which document it is so that I can delete it?

felipsmartins
  • 13,269
  • 4
  • 48
  • 56
Harry
  • 52,711
  • 71
  • 177
  • 261
  • Not sure if you have seen that: https://stackoverflow.com/questions/43342082/error-in-monogdb-errmsg-wiredtigerindexinsert-key-too-large-to-index-fa/43349413 – felipsmartins Dec 31 '18 at 01:43
  • @felipsmartins yes I don't want to bypass it, I think the document is broken. I want to find the document so that I can delete it. – Harry Dec 31 '18 at 02:04
  • well... maybe you want to post this question on dba.stackexchange too. maybe there [@jmikola](https://dba.stackexchange.com/users/103517/jmikola) (internal at MongoDB) or someone else can help you (like happens to me on time). – felipsmartins Dec 31 '18 at 02:26
  • @felipsmartins thank you, didn't know that existed. – Harry Dec 31 '18 at 02:40
  • This was cross-posted to [DBA StackExchange](https://dba.stackexchange.com/questions/226047/mongodb-find-document-with-too-large-key), where the question is more relevant. – Stennie Dec 31 '18 at 06:47

0 Answers0