[英]solr 8 “msg”:“ERROR: unknown field 'language'”
While updating solr 4 to solr 8, I am facing the error bellow when I am running the indexation to index my solr 8 cloud. 将solr 4更新为solr 8时,在运行索引以索引solr 8云时遇到了以下错误。
{
"responseHeader":{
"rf":1,
"status":400,
"QTime":118},
"error":{
"metadata":[
"error-class","org.apache.solr.common.SolrException",
"root-error-class","org.apache.solr.common.SolrException"],
"msg":"ERROR: [doc=16919!1379235912] unknown field 'language'",
"code":400}}
I run thie url 我运行这个网址
curl -s 'http://localhost:8983/solr/currnet1/update/csv?commit=true&separator=%09&escape=%5c&header=false&+fieldnames=id,doc_id' -H 'Content-type:text/plain; charset=utf-8' --data-binary @/Users/smukena/Projet/servers/solr-8.1.1/tsv/sampleFile.tsv
and my sampleFile.tsv has only one line with two column 我的sampleFile.tsv只有一行两列
There is no the field language in my schema.xml and in solrconfig.xml neiether. 我的schema.xml和solrconfig.xml中完全没有字段语言。
What am I doing wrong 我究竟做错了什么
To fix this issue, I had to remove the processor LangDetectLanguageIdentifierUpdateProcessorFactory in my solrconfig.xml. 要解决此问题,我必须在solrconfig.xml中删除处理器LangDetectLanguageIdentifierUpdateProcessorFactory 。
This processor adds the ability to detect the language of a document before indexing and then make appropriate decisions about analysis, etc. 该处理器增加了在建立索引之前检测文档语言然后对分析等做出适当决策的能力。
By setting it in solrconfig.xml, 通过在solrconfig.xml中进行设置,
<processor class="org.apache.solr.update.processor.TikaLanguageIdentifierUpdateProcessorFactory">
<lst name="defaults">
<str name="langid.fl">title,subject,text,keywords</str>
<str name="langid.langField">language</str>
</lst>
</processor>
solr was expecting the definition of the field language in the schema.xml field that I did not have. solr期望在我没有的schema.xml字段中定义字段语言。
So either remove that processor in solrconfig.xml or add language field in schema.xml 因此,要么在solrconfig.xml中删除该处理器,要么在schema.xml中添加language字段
Ref: https://cwiki.apache.org/confluence/display/solr/LanguageDetection 参考: https : //cwiki.apache.org/confluence/display/solr/LanguageDetection
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.