lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <>
Subject Re: How to Add a New core
Date Thu, 01 May 2014 13:24:19 GMT
On 5/1/2014 1:49 AM, Sohan Kalsariya wrote:
> Hello All.
> How do i add a new core in Solr ?
> My solr directory is :
> /usr/share/solr-4.6.1/example/solr
> And it is having only one collection i.e. collection1
> Now to add the new core I added a directory collection2 and in that I
> created 2 more directory.
> /conf & /lib
> Now my what should be the entry in solr.xml file?
> <solr>

Your solr.xml is the new format.  This was usable in 4.4.0, and the
solr.xml in the example was upgraded in 4.4 to use that format.  The new
solr.xml format means that Solr is doing core discovery.

This means that you don't add anything to the solr.xml.

One way to do it: Create a file in the collection2
directory that is similar to the one you'll find in the collection1
directory, and restart Solr.  The original core and the new core will
both be discovered because Solr is looking for the file.

Another way to do it: Once the conf directory exists with schema.xml,
solrconfig.xml, and any other config files that those reference, you can
also use the CoreAdmin API, which is exposed in the Solr admin UI.  You
need the CREATE action.  This should create the file and
add the core without requiring a Solr restart.


View raw message