mongodb添加索引报错:insert: key too large to index
来源:互联网 发布:java isdirectory 编辑:程序博客网 时间:2024/05/22 00:49
在mongo中构建索引报错
...insert: key too large to index...
原因
索引记录对索引最大大小有限制(值长度之和),当前大约是800字节。字段的值长度(从技术上说是索引中关键字的大小)大于该大小的文档将不能被索引
解决方案
- 不应该这样设计,如果对long string 构建索引如果太大会导致报错更好的全文索引的方式是使用搜索应用服务器solr,sphinx,elasticsearch等
- 修改mongo启动参数
mongod --setParameter failIndexKeyTooLong=false -f /usr/local/etc/mongod.conf
参考:http://blog.58share.com/?p=363
阅读全文
0 0
- mongodb添加索引报错:insert: key too large to index
- mongodb启动报错:key are too open
- nginx报错 client intended to send too large body: 1331696 bytes
- nginx报错 client intended to send too large body: 1331696 bytes
- windows下安装memcached,报错:Failed to ignore SIGHUP RESULT too large
- mongodb设置集群认证启动报错keyFilers0.key are too open
- matlab call Ncut: Matrix is too large to convert to linear index.
- 添加Large Key组件
- arithmetic Dimension too large Latex 报错的解决办法
- mysql 报错 query is too large (1041 > 1024) 处理
- redmine上传大文件报错Request Entity Too Large
- java long类型报错:error: integer number too large
- laravel上传文件报错:413 Request Entity Too Large
- Nginx报错 -- When upload large photo, error says "413 Request Entity Too Large".
- 使用last报Value too large
- Mac Codesign: signature too large to embed
- key,unique index,联合索引
- Requests 请求报错 [SSL: SSL_NEGATIVE_LENGTH] dh key too small
- 在ArcGIS中【选择元素】工具如何使用?
- Python基础_函数
- 实现统计的年,月,日
- 重写bind方法
- centos7安装iptables
- mongodb添加索引报错:insert: key too large to index
- Mnist进阶代码分析,Tensorboard的基本使用
- 饿了吗第七章better-scroll 中$els 相关问题
- 12个有趣的C语言面试题及答案
- Ubuntu下pip安装
- 240. Search a 2D Matrix II
- 贝叶斯网络
- Canny边缘检测
- 1001 Apple