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 core.properties 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 core.properties file. http://wiki.apache.org/solr/Core%20Discovery%20%284.4%20and%20beyond%29 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 core.properties file and add the core without requiring a Solr restart. Thanks, Shawn