Discovery-based core enumeration

(warning) old style solr.xml] - there's a new way of defining cores. Core discovery was introduced in 4.3.0 by SOLR-4196, but it is fundamentally broken in all 4.3 versions and not fixed until 4.4. Using the [Solr.xml (supported through 4.x) is recommended unless you have Solr4.4 or higher.

TODO: Lots to flesh out here, this is just barely a start for the docs, consider it a placeholder that will be expanded as time permits. Please ask any questions that come up on the user's list or whatever, and we'll expand this page. Or edit it yourself, all help appreciated!

Cores are no longer necessarily defined in in solr.xml. For the near term, solr.xml can exist either in the new or old styles. Whether solr.xml is interpreted as new or old-style is triggered by the absence or presence of a <cores> tag.

Format for new-style solr.xml

The solr.xml file has a new format, here is a sample. NUMBERS MADE UP FOR NOW!

<solr>
  <str name="adminHandler">handler</str>
  <int name="coreLoadThreads">3</str>
  <str name="coreRootDirectory">path to core root</str>
  <str name="managementPath">path</str>
  <str name="sharedLib">lib to share</str>
  <str name="shareSchema">true|false</str> // NOTE, may be replaced by using config sets
  <int name="transientCacheSize">25</str>

  <solrcloud>
    <int name="distribUpdateConnTimeout">30000</int>
    <int name="distribUpdateSoTimeout">15000</int>
    <str name="host">url for host</str>
    <str name="hostContext">solr</str>
    <int name="hostPort">7689</int>
    <int name="leaderVoteWait">15000</int>
    <int name="zkClientTimeout">30000</int>
    <str name="zkHost">url to host</str>
  </solrcloud>

  <logging>
    <str name="class">my.class.for.loggin</str>
    <str name="enabled">true|false</str>
    <watcher>
      <int name="size">12</int>
      <int name="threshold">42</int>
  </logging>

  <shardHandlerFactory class="qualified.path" name="handlerName">
    <int name="connTimeout">15000</int>
    <int name="socketTimeout">15000</int>
  </shardHandlerFactory>
</solr>

Finding cores

Exploration of the core tree terminates when a file named core.properties is encountered. Discovery of a file of that name is assumed to define the root of a core. There is no a-priori limit on the depth of the tree. That is, the directories under <SOLR_HOME> are explored until a core.properties file is encountered, and that directory is assumed to be the instanceDir for that core. Nested cores are NOT supported. The core.properties file presently recognizes the following entries: