How to create Solr 6 cores?

久未见 提交于 2019-12-02 21:08:00

Try this way

Navigate to Solr/solr-6.1.0/server/solr/

create new folder and name it netest.

copy conf folder from Solr/solr-6.1.0/server/solr/configsets/basic_configs/ and paste it inside netest folder.

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

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

hope this helps

You shouldn't use root, but solr user privileges to create Solr cores since data folder (e.g. /var/solr/data) is usually owned by solr. Secondly please note that provided solr shell script is still using the Solr Admin UI as the main starting point for administering Solr.

So try the following commands:

cd /opt/solr
sudo -u solr ./bin/solr create -c netest
sudo ls -la /var/solr/data

For any other problems, please double check that:

  • Solr is accessible via Admin UI (e.g. curl -s http://localhost:8983/solr/ or links).
  • jar command is accessible (it is in your PATH).
  • For syntax, run: bin/solr --help in your Solr HOME folder.

For troubleshooting, check your Solr logs (e.g. /var/solr/logs/solr.log).

Related: SOLR-7826: Permission issues when creating cores with bin/solr as root user.

Kiran

Its permission issue, so try to create a new core using below command, and it will work!

sudo -u solr bin/solr create -c demo
Manish Nakar

If you have created schema.xml and solrconfig.xml in your core directory, try Add Core from core admin page, it should work.

./solr create_core -c netest -d basic_configs

su - solr -c "/opt/solr/bin/solr create -c testcore -n 
data_driven_schema_configs"

This command works for me in solr 6.60 with the sudo user.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!