如何创建Solr 6内核? [英] How to create Solr 6 cores?
问题描述
我已经在Digital Ocean ubuntu实例上安装了Solr 6:
I've installed Solr 6 on a Digital Ocean ubuntu instance:
install_solr_service.sh solr-6.1.0.tgz
并验证Solr正在运行.但是,无论是通过UI还是在命令行中,我都无法创建任何核心.我尝试了以下各种不同的排列方式:
and verified that Solr is running. However, I cannot create any cores, either through the UI or at the command line. I've tried various different permutations of:
sudo ./solr create -c netest
包括
sudo ./solr create -c netest -d /opt/solr/server/solr/configsets/basic_configs/conf/
但它总是给我:
ERROR: Error CREATEing SolrCore 'netest': Unable to create core [netest] Caused by: /var/solr/data/netest/data
如果我提前创建目录:
sudo mkdir /var/solr/data/netest/
sudo mkdir /var/solr/data/netest/data
sudo chown -R solr:solr /var/solr/data
当我重新运行创建命令时,我得到:
when I rerun the create command I get:
错误:创建SolrCore'netest'时出错:无法创建core [netest]原因:在类路径或'/var/solr/data/netest'中找不到资源'solrconfig.xml'
ERROR: Error CREATEing SolrCore 'netest': Unable to create core [netest] Caused by: Can't find resource 'solrconfig.xml' in classpath or '/var/solr/data/netest'
如果我将solrconfig.xml
复制到目录中并再次运行命令,则会得到:
If I copy solrconfig.xml
into the directory and run the command again I get:
错误:创建SolrCore'netest'时出错:无法创建core [netest]原因:在类路径或'/var/solr/data/netest'中找不到资源'schema.xml'
ERROR: Error CREATEing SolrCore 'netest': Unable to create core [netest] Caused by: Can't find resource 'schema.xml' in classpath or '/var/solr/data/netest'
由于Google不能帮助我找到在哪里获取或创建schema.xml文件,因此我处于这一阶段.
and I'm stuck at this stage as google isn't helping me find where to get or create the schema.xml file.
任何人都可以帮忙吗?
推荐答案
尝试这种方式
导航到Solr/solr-6.1.0/server/solr/
创建新文件夹,并将其命名为 netest .
create new folder and name it netest.
从Solr/solr-6.1.0/server/solr/configsets/basic_configs/
复制conf文件夹并将其粘贴到 netest 文件夹中.
copy conf folder from Solr/solr-6.1.0/server/solr/configsets/basic_configs/
and paste it inside netest folder.
现在您在终端sudo ./solr create -c netest
这将使用conf文件夹中的配置文件创建名称为netest的newcore
This will create newcore with name netest using config files inside conf folder
希望这会有所帮助
这篇关于如何创建Solr 6内核?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!