通过指定配置目录创建核心时出错
Error when creating a core by specifying a config directory
我正在尝试使用以下命令在 SolrCloud 中创建一个核心:
sudo /opt/solr/bin/solr create -c Collection1 -d /home/callmekatootie/Desktop/conf
但是,我收到以下错误:
Connecting to ZooKeeper at localhost:9983 ...
Uploading /home/callmekatootie/Desktop/vm/configs for config Collection1
to ZooKeeper at localhost:9983
Creating new collection 'Collection1' using command:
http://localhost:8983/solr/admin/collections?action=CREATE&name=Collection1
&numShards=1&replicationFactor=1&maxShardsPerNode=1
&collection.configName=Collection1
ERROR: Failed to create collection 'Collection1' due to: org.apache.solr.client.
solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at
http://127.0.1.1:8983/solr: Error CREATEing SolrCore 'Collection1_shard1_replica1':
Unable to create core [Collection1_shard1_replica1]
Caused by: solr.SynonymExpandingExtendedDismaxQParserPlugin
什么是 SynonymExpandingExtendedDismaxQParserPlugin
以及为什么我会收到上述错误
找到问题的原因。
原来 SynonymExpandingExtendedDismaxQParserPlugin
是一个实际的插件,在我上传的配置文件中 SolrConfig.xml 中使用。
此插件可通过 https://github.com/healthonnet/hon-lucene-synonyms 获得,我必须将其复制到 /opt/solr/server/solr-webapp/webapp/WEB-INF/lib/
文件夹 - 我必须将该 jar 文件粘贴到该文件夹中。我重新启动了Solr,然后成功执行了提到的命令。
我正在尝试使用以下命令在 SolrCloud 中创建一个核心:
sudo /opt/solr/bin/solr create -c Collection1 -d /home/callmekatootie/Desktop/conf
但是,我收到以下错误:
Connecting to ZooKeeper at localhost:9983 ...
Uploading /home/callmekatootie/Desktop/vm/configs for config Collection1
to ZooKeeper at localhost:9983
Creating new collection 'Collection1' using command:
http://localhost:8983/solr/admin/collections?action=CREATE&name=Collection1
&numShards=1&replicationFactor=1&maxShardsPerNode=1
&collection.configName=Collection1
ERROR: Failed to create collection 'Collection1' due to: org.apache.solr.client.
solrj.impl.HttpSolrClient$RemoteSolrException:Error from server at
http://127.0.1.1:8983/solr: Error CREATEing SolrCore 'Collection1_shard1_replica1':
Unable to create core [Collection1_shard1_replica1]
Caused by: solr.SynonymExpandingExtendedDismaxQParserPlugin
什么是 SynonymExpandingExtendedDismaxQParserPlugin
以及为什么我会收到上述错误
找到问题的原因。
原来 SynonymExpandingExtendedDismaxQParserPlugin
是一个实际的插件,在我上传的配置文件中 SolrConfig.xml 中使用。
此插件可通过 https://github.com/healthonnet/hon-lucene-synonyms 获得,我必须将其复制到 /opt/solr/server/solr-webapp/webapp/WEB-INF/lib/
文件夹 - 我必须将该 jar 文件粘贴到该文件夹中。我重新启动了Solr,然后成功执行了提到的命令。