You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2018/03/02 22:21:09 UTC

[Solr Wiki] Update of "Core Discovery (4.4 and beyond)" by ShawnHeisey

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Solr Wiki" for change notification.

The "Core Discovery (4.4 and beyond)" page has been changed by ShawnHeisey:
https://wiki.apache.org/solr/Core%20Discovery%20%284.4%20and%20beyond%29?action=diff&rev1=17&rev2=18

Comment:
describe what happens when core.properties does not contain the name property.

  ## page was renamed from Core Discovery (4.3 and beyond)
  ## page was renamed from Core Discovery (4.2 and beyond)
  = Discovery-based core enumeration =
- <!> [[Solr4.4]] - 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)|old style solr.xml]] is recommended unless you have Solr4.4 or higher. 
+ <!> [[Solr4.4]] - 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)|old style solr.xml]] 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!
   * Please merge this page here: [[Solr.xml 4.4 and beyond]].
  
  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.
-  * If there is a <cores> element, it is assumed to be an old-style solr.xml. 
+  * If there is a <cores> element, it is assumed to be an old-style solr.xml.
   * If there is ''not'' a <cores> tag, then this is assumed to be a new-style solr.xml file and the cores are enumerated from SOLR_HOME (i.e. auto discovery).
   * In either case, if patterns are detected from both formats, errors are thrown.  For example, if you have an old-style solr.xml and you include the str or int tags from the new format, Solr will not start up properly and an error will be logged.
  
@@ -25, +25 @@

    <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>
@@ -36, +36 @@

      <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>
@@ -44, +44 @@

        <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>
@@ -54, +54 @@

  
  == 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:
-  * name - the name of the core required.
+  * name - the name of the core required.  If this parameter is not present, the core's name will be the name of the directory containing the core.properties file.  The directory structure above that directory is not part of the name.
   * config - the configuration file. Defaults to solrconfig.xml
   * dataDir - the directory where the index, tlog, etc. are stored. Again, since this is discovery-based, omit this unless you have special needs.
   * ulogDir - where the transaction log resides. It may be advantageous to put the transaction lot on a different disk than the index.