簡體   English   中英

初始化 Solr 內核時出錯:加載 class 'solr.ICUCollationField' 時出錯

[英]Error when initializing Solr core: Error loading class 'solr.ICUCollationField'

使用 Drupal,我們嘗試從 solr_api_search 模塊導入配置文件。 導入它們並嘗試初始化核心時,我看到以下錯誤(Solr 7.7.2):

Could not load conf for core testcore: Can't load schema /data/solr_data/data/testcore/conf/schema.xml: Plugin init failure for [schema.xml] fieldType \"collated_ar\": Error loading class 'solr.ICUCollationField'

這就是 solrcore.properties 文件內部的樣子。 在一些有類似問題的人報告說它解決了他們的問題之后,我添加了solr.install.dir選項:

solr.replication.master=false
solr.replication.slave=false
solr.replication.pollInterval=00:00:60
solr.replication.masterUrl=http://localhost:8983/solr
solr.replication.confFiles=schema.xml,schema_extra_types.xml,schema_extra_fields.xml,elevate.xml,stopwords_ar.txt,synonyms_ar.txt,nouns_ar.txt,protwords_ar.txt,accents_ar.txt,stopwords_en.txt,synonyms_en.txt,protwords_en.txt,accents_en.txt,stopwords_fr.txt,synonyms_fr.txt,nouns_fr.txt,protwords_fr.txt,accents_fr.txt,stopwords_de.txt,synonyms_de.txt,nouns_de.txt,protwords_de.txt,accents_de.txt,stopwords_el.txt,synonyms_el.txt,nouns_el.txt,protwords_el.txt,accents_el.txt,stopwords_hi.txt,synonyms_hi.txt,nouns_hi.txt,protwords_hi.txt,accents_hi.txt,stopwords_it.txt,synonyms_it.txt,nouns_it.txt,protwords_it.txt,accents_it.txt,stopwords_und.txt,synonyms_und.txt,protwords_und.txt,accents_und.txt,stopwords_pl.txt,synonyms_pl.txt,nouns_pl.txt,protwords_pl.txt,accents_pl.txt,stopwords_pt-br.txt,synonyms_pt-br.txt,nouns_pt-br.txt,protwords_pt-br.txt,accents_pt-br.txt,stopwords_ru.txt,synonyms_ru.txt,nouns_ru.txt,protwords_ru.txt,accents_ru.txt,stopwords_es.txt,synonyms_es.txt,nouns_es.txt,protwords_es.txt,accents_es.txt,stopwords_tr.txt,synonyms_tr.txt,nouns_tr.txt,protwords_tr.txt,accents_tr.txt

solr.luceneMatchVersion=7.7
solr.install.dir=/opt/solr

這是使用 ps -ef 運行的進程:

java -server -Xms512m -Xmx512m -XX:NewRatio=3 -XX:SurvivorRatio=4 -XX:TargetSurvivorRatio=90 -XX:MaxTenuringThreshold=8 -XX:+UseConcMarkSweepGC -XX:+UseParNewGC -XX:ConcGCThreads=4 -XX:ParallelGCThreads=4 -XX:+CMSScavengeBeforeRemark -XX:PretenureSizeThreshold=64m -XX:+UseCMSInitiatingOccupancyOnly -XX:CMSInitiatingOccupancyFraction=50 -XX:CMSMaxAbortablePrecleanTime=6000 -XX:+CMSParallelRemarkEnabled -XX:+ParallelRefProcEnabled -verbose:gc -XX:+PrintHeapAtGC -XX:+PrintGCDetails -XX:+PrintGCDateStamps -XX:+PrintGCTimeStamps -XX:+PrintTenuringDistribution -XX:+PrintGCApplicationStoppedTime -Xloggc:/data/solr_data/logs/solr_gc.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=9 -XX:GCLogFileSize=20M -Dsolr.log.dir=/data/solr_data/logs -Djetty.port=8983 -DSTOP.PORT=7983 -DSTOP.KEY=solrrocks -Duser.timezone=UTC -Djetty.home=/opt/solr/server -Dsolr.solr.home=/data/solr_data/data -Dsolr.data.home= -Dsolr.install.dir=/opt/solr -Dsolr.default.confdir=/opt/solr/server/solr/configsets/_default/conf -Dlog4j.configurationFile=file:/data/solr_data/log4j.properties -Xss256k -Xss256k -Dsolr.jetty.https.port=8983 -Dsolr.log.muteconsole -XX:OnOutOfMemoryError=/opt/solr/bin/oom_solr.sh 8983 /data/solr_data/logs -jar start.jar --module=http

我在/opt/solr/contrib/analysis-extras/lib中有以下庫

-rw-r--r--. 1 solr solr 12370975 Jun 20  2018 icu4j-62.1.jar
-rw-r--r--. 1 solr solr    20140 Feb 18  2018 morfologik-fsa-2.1.5.jar
-rw-r--r--. 1 solr solr  1886867 Feb 18  2018 morfologik-polish-2.1.5.jar
-rw-r--r--. 1 solr solr    53644 Feb 18  2018 morfologik-stemming-2.1.5.jar
-rw-r--r--. 1 solr solr  1245779 Jun 29  2018 opennlp-tools-1.9.0.jar

為了讓 Solr 加載.jar 文件,我是否缺少一些選項?

SOlr 需要不同的功能,需要可選的庫。 所有這些都帶有 Solr。 您需要調整solr.install.dir就像在名為INSTALL.md的文件中已經提到的那樣

更新 solrcore.properties 中solrcore.properties solr.install.dir=/opt/solr的路徑以解決問題。

檢查名為"icu4j-62.1.jar" 檢查solrConfig.xml中提到的相同路徑並檢查 lib 是否正在加載。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM