lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject Re: Reg:- Create Solr Core Using Command Line
Date Tue, 06 Feb 2018 05:39:50 GMT
On 2/5/2018 7:45 PM, @Nandan@ wrote:
> Now I want to create solr core to start my basic search using Solr UI.
> Steps which I Follow :-
> 1) Go to bin directory and start solr
> C:\solr\bin>solr start -p 8983
> 2) books_data.csv is in C:\solr location
> 3) Now I try to create solr core.
> C:\solr\bin>solr create_core -c books_data -d C:\solr

I think that your usage of the -d option is incorrect.  In order for 
this solr script command to work, the argument to the -d option (which 
you have as C:\solr) would have to be a config directory, containing a 
minimum of solrconfig.xml and the schema.  The schema file will 
typically be named either managed-schema (with no extension) or 
schema.xml.  The exact name will depend on what solrconfig.xml contains. 
  If either of those configs reference other files, those files usually 
must also be in that directory.

Alternatively, the argument to the -d option can be the name of one of 
the configset directories in server/solr/configsets.  If -d is not 
included on the commandline, the source of the config will be 
server/solr/configsets/_default.

Once the config source is found, the create_core action will make the 
directory for the new core, make the conf directory inside that, copy 
the conf directory from your -d source, then make an HTTP call to the 
CoreAdmin API to help Solr actually find the core and load it.

Calling the CoreAdmin API yourself when you haven't provided a 
configuration won't work.  See the large warning box with the title 
"CREATE must be able to find a configuration!" at this URL:

https://lucene.apache.org/solr/guide/7_2/coreadmin-api.html

Thanks,
Shawn

Mime
View raw message