例外:BSONObj大小:-286331154(0xEEEEEEEE)无效.大小必须介于0到16793600(16MB)之间 [英] exception: BSONObj size: -286331154 (0xEEEEEEEE) is invalid. Size must be between 0 and 16793600(16MB)

查看:59
本文介绍了例外:BSONObj大小:-286331154(0xEEEEEEEE)无效.大小必须介于0到16793600(16MB)之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用完整搜索http://docs.mongodb.org/manual/tutorial/search-for-text/

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

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

效果很好

但是当我添加条件时

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}]}]} } )

我收到一个错误

{

    "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

}

删除语音"一词

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}]}]} } );

接收

对请求的响应...... ......

response to a request ...... ......

],

"stats" : {

    "nscanned" : 87,

    "nscannedObjects" : 87,

    "n" : 18,

    "nfound" : 18,

    "timeMicros" : 1013

},

"ok" : 1

}

不明白为什么会发生错误?

Couldn’t understand why the error occurs?

数据库不是很大的"storageSize":2793472,

database is not large "storageSize" : 2793472,

db.Item.stats()

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

}

推荐答案

我在使用相对较小的数据库(12GB)的mongo 3.0.0和3.1.9中也遇到了同样的问题.

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

在此上浪费了大约4个小时的时间后,我发现了使用 hidden 参数

After wasting roughly 4 hours of time on this I found workaround using hidden parameter

mongorestore --batchSize=10

其中的数字根据数据的性质而变化.从1000开始.

where number varies depending on nature of your data. Start with 1000.

这篇关于例外:BSONObj大小:-286331154(0xEEEEEEEE)无效.大小必须介于0到16793600(16MB)之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆