Solr 中遇到的问题

1、问题1 :whose UTF8 encoding is longer than the max length 32766

Error from server at http://localhost:8983/solr/newcore: Exception writing document id 995 

to the index; possible analysis error: Document contains at least one immense term in 

field="answerStr" (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: '[65, 32, 66, 32, 67, 32, 65, 32, 66, 32, 67, 32, -30, -120, -102, 
32, 65, 32, 66, 32, 66, 32, 67, 32, -30, -120, -102, 32, 65, 32]...', original message: 
bytes can be at most 32766 in length; got 33098. Perhaps the document has an indexed string 
field (solr.StrField) which is too large

解决方式:有些数据的超过了该字段的最大长度,会报这个错

在solr中schema-->查询 错误中提示的 字段 类型  显示如下。

修改配置文件中改字段的配置,将大字段 设置去掉索引,重启solr

<field name="answerStr" type="string" indexed="false" stored="true"/>

再次查询该字段信息 

此时可以向此字段添加数据

 

posted @ 2019-07-22 17:22  yinder  阅读(733)  评论(0编辑  收藏  举报