0

Unable to create index for large data column getting below error

syntax db.APP_AIR.createIndex ({Message : 1})

Btree::insert: key too large to index, failing APP_LOG_11032016.APP_AIR.$Message_1 4058 { : "Back in 2006, we at SSSSfelt compelled to provide the hundreds of millions of underbanked SSSS, who do not have the ability to make payments onl..." }

kindly help me how to resolve this issue..

4
  • 2
    This is well documented "The total size of an index entry, which can include structural overhead depending on the BSON type, must be less than 1024 bytes.". And in your case this would make perfect sense. It actually looks by the content that you really want a "text index" instead. Commented Mar 15, 2016 at 7:25
  • Thank you it is working fine using the db.APP_AIR.createIndex ({Message :"text"}) .... kindly advice C# syntax for the same. Commented Mar 16, 2016 at 4:54
  • It's exactly the same. BSON object naming the field with the content "text". Commented Mar 16, 2016 at 5:02
  • Refer to my answer following stackoverflow.com/a/40422313/1647971. Commented Nov 6, 2016 at 9:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.