简体   繁体   English

solr 8“ msg”:“错误:未知字段'language'”

[英]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.

相关问题 含Sitecore的未知字段Solr - Unknown field Solr with Sitecore 使用Solarium的Solr HTTP错误“未知字段”错误 - Solr HTTP Error 'Unknown Field' Error using Solarium 通过Haystack构建Solr索引会引发未知的字段错误 - Building Solr indexes through Haystack throws unknown field error Tomcat上的Solr无法发布xml文件而没有错误字段未知 - Solr on Tomcat not able to post xml files without error field unknown solr错误:未知字段被忽略_stream_source_info - solr error: unknown field ignored_stream_source_info Solr:对嵌套文档使用标记关系会引发未知字段错误 - Solr: using the labelled relationship for nested documents throws unknown field error Solr-将数据发布到核心时如何解决“错误添加字段…msg =对于输入字符串” - Solr - How to fix “Error adding field … msg=For input string” when post data to core Solr - 将 json 数据发送到核心时“添加字段时出错……msg=无效的日期字符串” - Solr - "Error adding field … msg=Invalid Date String" when sending json data to core 在索引 hybris 中新添加的语言时出现 SOLR 错误:[doc=productCatalog/Online/product_code] 未知字段 &#39;spellcheck_de_DE&#39;&#39; - while indexing getting SOLR error for newly added language in hybris : [doc=productCatalog/Online/product_code] unknown field 'spellcheck_de_DE'' 未知的场Solr Drupal模块 - unknown field solr drupal module
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM