So I'm just playing around with Solr 5, but I tried to add a new Core through the Admin UI and the command line with:
bin/solr create -c new_core
But in both situations I get the following error:
new_core: org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Could not load conf for core new_core: Error loading solr config from /Users/blah/lib/solr-5.3.0/server/solr/new_core/conf/solrconfig.xml
I started my Solr server using this:
bin/solr start
I'm following the docs here:
https://cwiki.apache.org/confluence/display/solr/Running+Solr
So what's the fix? How was this supposed to work out of the box given I assume there must be some template that the Admin UI uses when creating new cores?
Any core. properties file in any directory of your Solr installation (or in a directory under where solr_home is defined) will be found by Solr and the defined properties will be used for the core named in the file. In standalone mode, solr. xml must reside in solr_home .
For the solr delete command the -c <name> option is required while the other options (parameters) are optional. Delete the named Solr core or collection with default options. Solr will delete the specified core and its associated configuration files at the first port number found.
The error is coming because there is no new_core
configured in your setup.
Please perform the following steps:
mkdir /Users/blah/lib/solr-5.3.0/server/solr/core_name
echo "name=core_name" > /Users/blah/lib/solr-5.3.0/server/solr/core_name/core.properties
cp -r /Users/blah/lib/solr-5.3.0/server/solr/configsets/basic_configs/conf /Users/blah/lib/solr-5.3.0/server/solr/core_name/
Some important point to note:
core.properties
and conf
directory should be placed at same path.conf
directory will contain the schema.xml
and solrconfig.xml
files.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With