Exception: BSONObj size: -286331154 (0xEEEEEEEE) is not valid. Size must be between 0 and 16793600 (16 MB)

I am trying to use the full search http://docs.mongodb.org/manual/tutorial/search-for-text/

 db ['Item']. runCommand ('text', {search: 'deep voice', language: 'english'}) 

it works well

but when i add conditions

 db['Item'].runCommand( 'text', { search: 'deep voice' , language: 'english' , filter: {"and":[{"_extendedBy":{"in":["Voiceover"]}},{"and":[{"or":[{"removed":null},{"removed":{"\(exists":false}}]},{"category":ObjectId("51bc464ab012269e23278d55")},{"active":true},{"visible":true}]}]} } ) 

I get an error

 { "queryDebugString" : "deep|voic||||||", "language" : "english", "errmsg" : "exception: BSONObj size: -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB) First element: _extendedBy: \"Voiceover\"", "code" : 10334, "ok" : 0 } 

delete the word "voice"

 db['Item'].runCommand( 'text', { search: 'deep' , language: 'english' , filter: {"\)and":[{"_extendedBy":{"in":["Voiceover"]}},{"and":[{"or":[{"removed":null},{"removed":{"exists":false}}]},{"category":ObjectId("51bc464ab012269e23278d55")},{"active":true},{"visible":true}]}]} } ); 

receive

response to the request ............

],

 "stats" : { "nscanned" : 87, "nscannedObjects" : 87, "n" : 18, "nfound" : 18, "timeMicros" : 1013 }, "ok" : 1 } 

Failed to understand why the error occurs?

Database

small "storageSize": 2793472,

db.Item.stats ()

{

  "ns" : "internetjock.Item", "count" : 616, "size" : 2035840, "avgObjSize" : 3304.935064935065, "storageSize" : 2793472, "numExtents" : 5, "nindexes" : 12, "lastExtentSize" : 2097152, "paddingFactor" : 1.0000000000001221, "systemFlags" : 0, "userFlags" : 1, "totalIndexSize" : 7440160, "indexSizes" : { "_id_" : 24528, "modlrHff22a60ae822e1e68ba919bbedcb8957d5c5d10f" : 40880, "modlrH6f786b134a46c37db715aa2c831cfbe1fadb9d1d" : 40880, "modlrI467f6180af484be29ee9258920fc4837992c825e" : 24528, "modlrI5cb302f507b9d0409921ac0c51f7d9fc4fd5d2ee" : 40880, "modlrI6393f31b5b6b4b2cd9517391dabf5db6d6dd3c28" : 8176, "modlrI1c5cbf0ce48258a5a39c1ac54a1c1a038ebe1027" : 32704, "modlrH6e623929cc3867746630bae4572b9dbe5bd3b9f7" : 40880, "modlrH72ea9b8456321008fd832ef9459d868800ce87cb" : 40880, "modlrU821e16c04f9069f8d0b705d78d8f666a007c274d" : 24528, "modlrT88fc09e54b17679b0028556344b50c9fe169bdb5" : 7080416, "modlrIefa804b72cc346d66957110e286839a3f42793ef" : 40880 }, "ok" : 1 

}

+1
source share
3 answers

I had the same problem with mongo 3.0.0 and 3.1.9 with a relatively small database (12 GB).

After spending about 4 hours on this, I found a workaround using a hidden parameter

 mongorestore --batchSize=10 

where the number depends on the nature of your data. Start at 1000.

+8
source

The result document returned by the first request appears to be larger than 16 MB. MongoDB file size is 16 MB. The second query returns a document that is less than 16 MB in size and therefore errors.

Nothing like this. Here's a link to the documentation:

http://docs.mongodb.org/manual/reference/limits/

+3
source

Restore the text index and everything will work :-)

db.Item.dropIndex ('modlrT88fc09e54b17679b0028556344b50c9fe169bdb5');

db.Item.ensureIndex ({'keywords': 'text'}, {'Name': 'modlrT88fc09e54b17679b0028556344b50c9fe169bdb5'})

db.Item.stats ()

...

"modlrT88fc09e54b17679b0028556344b50c9fe169bdb5": 7080416, // before

...

"modlrT88fc09e54b17679b0028556344b50c9fe169bdb5": 2518208 // after reconstructing the text index

+1
source

All Articles