ElasticSearch 32766 的限制

  插入一个稍大的数据到elasticsearch的时候,突然报错“

400 - elastic: Error 400 (Bad Request): Document contains at least one immense term in field=\"document.policy\" (whose UTF8 encoding is longer than the max length 32766), all of which were skipped.  Please correct the analyzer to not produce such terms.  The prefix of the first immense term is: '[101, 121, 74, 48, 90, 87, 53, 104, 98, 110, 82, 102, 99, 109, 86, 120, 100, 87, 108, 121, 90, 87, 49, 108, 98, 110, 82, 122, 73, 106]...', original message: bytes can be at most 32766 in length; got 43752 [type=illegal_argument_exception]

处理方式是,将policy字段的“index”方式设置为“no”。具体原因回头我再来写。

posted on 2020-03-26 23:09  余十川  阅读(1601)  评论(0编辑  收藏  举报