solr 错误:Caused by: org.wltea.analyzer.lucene.IKAnalyzer
程序员文章站
2024-02-21 22:29:22
...
一、 问题描述
CDH5.15.2的solr集群下,创建ik分词器的实例,但是报错。Ik分词器的配置文件都已经上传各个节点solr对应目录下,但是还是报错:
solrctl collection --create test_ik4 -s 2 -c test_ik -r 1 -m 3
报错
<?xml version="1.0" encoding="UTF-8"?> <response> <lst name="responseHeader"> <int name="status"> 0</int> <int name="QTime"> 4208</int> </lst> <lst name="failure"> <str> org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'test_ik3_shard2_replica2': Unable to create core [test_ik3_shard2_replica2] Caused by: org.wltea.analyzer.lucene.IKAnalyzer</str> <str> org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'test_ik3_shard2_replica1': Unable to create core [test_ik3_shard2_replica1] Caused by: org.wltea.analyzer.lucene.IKAnalyzer</str> <str> org.apache.solr.client.solrj.impl.HttpSolrServer$RemoteSolrException:Error CREATEing SolrCore 'test_ik3_shard1_replica1': Unable to create core [test_ik3_shard1_replica1] Caused by: org.wltea.analyzer.lucene.IKAnalyzer</str> </lst>
<lst name="success"> <lst> <lst name="responseHeader"> <int name="status"> 0</int> <int name="QTime"> 3584</int> </lst> <str name="core"> test_ik3_shard1_replica2</str> </lst> </lst> </response>
二、 问题原因
ik配置文件ext.dic、IKAnalyzer.cfg.xml、stopword.dic没有上传到solr的web服务classes目录下,以及没有重启服务器
三、解决
1.把ik分词器的jar包和三个分解配置文件分别导入/opt/cloudera/parcels/CDH/lib/solr/webapps/solr/WEB-INF/lib和/opt/cloudera/parcels/CDH/lib/solr/webapps/solr/WEB-INF/classes里面
2.重启solr集群服务
3.运行:
solrctl collection --create test_ik5 -s 2 -c test_ik -r 1 -m 3
上一篇: 系列之TCP/IP协议-概述(001)
下一篇: 获取网页内容WebClient
推荐阅读
-
solr 错误:Caused by: org.wltea.analyzer.lucene.IKAnalyzer
-
solr5.2.1整合web项目,执行查询时报语法错误。求解!!!
-
Caused by: android.os.NetworkOnMainThreadException错误解决办法
-
定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
-
定位Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)错误
-
Unity 错误笔记(一) Gradle导出项目后在AS中打包出错 Caused by: java.lang.OutOfMemoryError
-
Caused by: android.os.NetworkOnMainThreadException错误解决办法
-
Caused by: java.net.UnknownHostException: www.w3.org错误
-
solr5.2.1整合web项目,执行查询时报语法错误。求解!!!
-
Caused by: org.apache.solr.common.SolrException: Invalid UUID String: '1'