zoukankan      html  css  js  c++  java
  • solr 启动报错Cannot load analyzer: org.wltea.analyzer.lucene.IKAnalyzer

    schema.xml 配置文件信息:
      

    <field name="title" type="text_ik" indexed="true" stored="true" multiValued="true"/>
    <field name="describe" type="text_ik" indexed="true" stored="true" />


    <fieldType name="text_ik" class="solr.TextField"> <!--index add IKAnalyzer--> <analyzer type="index" isMaxWordLength="false" class="org.wltea.analyzer.lucene.IKAnalyzer"/> <!--search add IKAnalyzer--> <analyzer type="query" isMaxWordLength="true" class="org.wltea.analyzer.lucene.IKAnalyzer"/> </fieldType>

      

    错误提示:

    HTTP ERROR 500

    Problem accessing /solr/. Reason:

        {msg=SolrCore 'collection1' is not available due to init failure: Could not load conf for core collection1: Plugin init failure for [schema.xml] fieldType "text_ik": Cannot load analyzer: org.wltea.analyzer.lucene.IKAnalyzer. Schema file is /home/hadoop/CDH5/solr-4.10.4/example/solr/collection1/conf/schema.xml,trace=org.apache.solr.common.SolrException: SolrCore 'collection1' is not available due to init failure: Could not load conf for core collection1: Plugin init failure for [schema.xml] fieldType "text_ik": Cannot load analyzer: org.wltea.analyzer.lucene.IKAnalyzer. Schema file is /home/hadoop/CDH5/solr-4.10.4/example/solr/collection1/conf/schema.xml
    	at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:745)
    	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:307)
    	at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207)
    	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)
    	at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)
    	at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)
    错误原因:
    因为是用jeety启动的, 在添加了IK的分词定义后没有把ik分词jar包添加到 solr-4.10.4/example/solr-webapp/webapp/WEB-INF/lib 目录下
    解决办法: 将IKjar 包添加到该目录下即可(该目录需要自己创建)
  • 相关阅读:
    数据结构与算法之“图”
    数据结构与算法之队列、栈
    数据结构与算法之二叉搜索树
    ue mobile GI
    ue ios 用xcode 断点debug手机 显示call stack的环境搭建 /instrument 显示线程名/stat filestart
    ue 后效里宏的设置
    ue上 sceneColorMobile 在android 和ios上表现不同的问题
    减少ue编译shader的时间
    ue 搭建android/ios联机 debug环境
    对曝光的理解 autoExposure
  • 原文地址:https://www.cnblogs.com/zhanggl/p/4613799.html
Copyright © 2011-2022 走看看