日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > 数据库 >内容正文

数据库

Solr数据库6.3.0版本配置问题:whose UTF8 encoding is longer than the max length 32766

發(fā)布時(shí)間:2023/12/10 数据库 40 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Solr数据库6.3.0版本配置问题:whose UTF8 encoding is longer than the max length 32766 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

問題描述,入庫時(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)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。