I'm trying to save a long text/string on a parse-server instance that's hosted on heroku. I'm saving this through a node-js code. Of course, mongodb is used as the db.
The string is part of a parse object and when I try to save it, I get an error on Parse that doesn't help:
ParseError { code: 1, message: undefined }
Upon checking the logs through Parse Dashboard, I see:
Error generating response. { MongoError: Btree::insert: key too large to index, failing aaa.prod.$_p_productDescription_1 1034 { : "aaaLocation$jw5PnglCB1", : new Date(1494147063161), : "This is the text I'm trying to create in mongo blablablablalbalbalbalbalbalblablalbalalbalblablablalbalbalblalbalblab..." }
at Function.MongoError.create (/app/node_modules/mongodb-core/lib/error.js:31:11)
at toError (/app/node_modules/mongodb/lib/utils.js:139:22)
at /app/node_modules/mongodb/lib/collection.js:739:67
at /app/node_modules/mongodb-core/lib/connection/pool.js:461:18
at _combinedTickCallback (internal/process/next_tick.js:73:7)
at process._tickDomainCallback (internal/process/next_tick.js:128:9)
name: 'MongoError',
message: 'Btree::insert: key too large to index, failing aaa.prod.$_p_productDescription_1 1034 { : "aaaLocation$jw5PnglCB1", : new Date(1494147063161), : "This is the text I'm trying to create in mongo blablablablalbalbalbalbalbalblablalbalalbalblablablalbalbalblalbalblab..." }',
driver: true,
index: 0,
code: 17280,
errmsg: 'Btree::insert: key too large to index, failing
Is there no way to store long texts in mongo through a Parse server?
Maybe I'm not supposed to be doing this with such an implementation, but what's the alternative?
via theNotSoPro
No comments:
Post a Comment