如何创建 Solr 6 内核? [英] How to create Solr 6 cores?

查看:14
本文介绍了如何创建 Solr 6 内核?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在 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:

错误:错误 CREATEing SolrCore 'nettest':无法创建核心 [nettest] 原因:在类路径或 '/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:

错误:错误 CREATEing SolrCore 'nettest':无法创建核心 [nettest] 原因:在类路径或 '/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/

创建新文件夹并将其命名为 nettest.

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

now you enter this command on terminal sudo ./solr create -c netest

这将使用 conf 文件夹中的配置文件创建名为 netest 的 newcore

This will create newcore with name netest using config files inside conf folder

希望能帮到你

这篇关于如何创建 Solr 6 内核?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆