I'm setting up solr locally for my development purposes and integration with Drupal 7. I'm not very familiar with tomcat. My background has primarily been LAMP setups.
So I went and installed the package provided by ubuntu for apache solr following this guide.
sudo apt-get install tomcat6 tomcat6-admin tomcat6-common tomcat6-user tomcat6-docs tomcat6-examples
sudo apt-get install solr-tomcat
I've got that working. The apt-get package manager does a great job and allows me to setup solr but with one core.
What steps need to be taken to enable multi core setup for apache solr?
And below is my solr.xml
file:
sudo nano /var/lib/tomcat6/conf/Catalina/localhost/solr.xml
<!--
Context configuration file for the Solr Web App
-->
<Context path="/solr" docBase="/usr/share/solr"
debug="0" privileged="true" allowLinking="true" crossContext="true">
<!-- make symlinks work in Tomcat -->
<Resources className="org.apache.naming.resources.FileDirContext" allowLinking="true" />
<Environment name="solr/home" type="java.lang.String" value="/usr/share/solr" override="true" />
</Context>
The guide in OP is a quick start quide and does not touch on multi-core configuration.
There is an official guide in solr site: http://wiki.apache.org/solr/CoreAdmin
It is very long. I will quote the initial setup portion.
Partial Quote
Configuration
To enable support for dynamic SolrCore administration, place a file named solr.xml in the solr.home directory. Here is an example solr.xml file:
You can also specify properties in solr.xml which can be used in the solrconfig.xml and schema.xml files.
The properties can be container scope (i.e. specified after < solr > but outside of a < core > element) in which case it is automatically inherited by each core. Therefore, they can be used in any of the cores' configuration files.
The properties can also be defined in a core's scope (inside the < core > element) in which case they can be used only in that core's scope. If a property by that name already exists in the container scope then it will be overridden.
Besides them, a few properties are automatically added in the core scope. They are:
Such properties can be used inside solrconfig.xml and schema.xml files by specifying an expression with optionally, a default value.
The above expression will evaluate to the value specified in solr.xml for the property name "solr.snapshooter". If no value is defined in solr.xml, it will check if a system property by that name exists otherwise it will use the specified default value. If no default value is specified, a runtime exception will be thrown and the core may fail to startup.