Solr数据库6.3.0版本配置问题:whose UTF8 encoding is longer than the max length 32766
問題描述,入庫時(shí),在solr的web界面上按條件搜索不到相應(yīng)的字段內(nèi)容,查看solr數(shù)據(jù)庫后臺(tái)報(bào)錯(cuò)如下
2018-05-09 08:51:27.736 ERROR (http-nio-8032-exec-32) [c:comos s:shard3 r:core_node12 x:core3] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Exception writing document id fytxtex5788 to the index; possible analysis error: Document contains at least one immense term in field="html" (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: '[60, 109, 101, 116, 97, 32, 104, 116, 116, 112, 45, 101, 113, 117, 105, 118, 61, 34, 67, 111]...', original message: bytes can be at most 32766 in length; got 40928. Perhaps the document has an indexed string field (solr.StrField) which is too large2018-05-09 08:51:28.629 ERROR (http-nio-8032-exec-32) [c:comos s:shard3 r:core_node12 x:core3] o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Exception writing document id fytxtex5788 to the index; possible analysis error: Document contains at least one immense term in field="html" (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: '[60, 109, 101, 116, 97, 32, 104, 116, 116, 112, 45, 101, 113, 117, 105, 118, 61, 34, 67, 111]...', original message: bytes can be at most 32766 in length; got 40928. Perhaps the document has an indexed string field (solr.StrField) which is too large主要報(bào)錯(cuò):ERROR o.a.s.h.RequestHandlerBase org.apache.solr.common.SolrException: Exception writing document id to the index; possible analysis error: Document contains at least one immense term in field="html" (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: '[……]...', original message: bytes can be at most 32766 in length; got 40928. Perhaps the document has an indexed string field (solr.StrField) which is too large。
問題原因:
跟網(wǎng)上找到的一樣,看報(bào)錯(cuò)是因?yàn)閒ield名為"html"的在入庫時(shí)因?yàn)槌瞿J(rèn)值失敗。
解決方法:
在solr6版本以后已經(jīng)用managed-schema代替了原來的schema.xml。且可以在web管理界面看到。
從圖中可以看到這個(gè)html的類型是Dynamic Field,名稱是*,然后Type是string。所以我們要做的就是找到managed-schema文件,修改<dynamicField name="*" type="string" ? ?indexed="true" ?stored="false" multiValued="true" />其中的type=text_general。
重啟Zookeeper,重新執(zhí)行zookCli.sh ,重新啟動(dòng)solr數(shù)據(jù)庫。查看type 變成text_general后,入庫無報(bào)錯(cuò)。
總結(jié)
以上是生活随笔為你收集整理的Solr数据库6.3.0版本配置问题:whose UTF8 encoding is longer than the max length 32766的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 数据结构与算法实战-C++实现
- 下一篇: mysql日期截取年月_摄影大赛丨“我遇