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 2013/07/22 16:16:21 UTC

[Solr Wiki] Update of "Solr.xml 4.4 and beyond" by ErickErickson

Dear Wiki user,

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

The "Solr.xml 4.4 and beyond" page has been changed by ErickErickson:
https://wiki.apache.org/solr/Solr.xml%204.4%20and%20beyond?action=diff&rev1=9&rev2=10

  ## page was renamed from Solr.xml 4.3 and beyond
  = Solr.xml 4.4 and beyond =
  
- As of <!> [[Solr4.4]] there is an alternate structure for the solr.xml config file '''which will become mandatory for 5.0'''. This is very much a "live document" sort of page, I'm (Erick Erickson) finishing up the code and intend to expand this page as time permits. For the time being, the main points are:
+ As of <!> [[Solr4.4]] there is an alternate structure for the solr.xml config file '''which will become mandatory for 5.0'''.
  
   * Optionally as of <!> [[Solr4.4]] and mandatory for [[Solr5.0]], the structure of the solr.xml file has changed. In a nutshell, <cores> and <core> have been replaced by auto-discovering cores. Whether to use old or new-style core definitions is determined by whether the <cores> tag is present in solr.xml. In 5.0, presence of the <cores> tag will generate an error on startup.
   * An optional property ''coreRootDirectory'' can cause the discovery process to start at an arbitrary directory other than SOLR_HOME.
@@ -12, +12 @@

  
  == Structure of the new-style solr.xml ==
  
- Basically, it's mostly a move from the older attributes to a flatter style, and removal of <cores> and <core> tags. Here's a sample file. Note that any of these values can have a system property defined by specifying -Dpropname=propvalue on JVM startup (should these have solr. in front?):
+ Basically, it's mostly a move from the older attributes to a flatter style, and removal of <cores> and <core> tags. Here's a sample file. Note that any of these values can have a system property defined by specifying -Dpropname=propvalue on JVM startup:
  
- <!> Caution! These are just the test values from a unit test and are '''not''' reasonable values! I'm getting them up for comment, I'll put reasonable ones in Real Soon Now.
+ <!> Caution! These are just the test values from a unit test and are '''not''' reasonable values! They're intended to show the possible parameters.
  {{{
  <solr>
    <str name="adminHandler">testAdminHandler</str>
@@ -56, +56 @@

  
  
  == Core discovery process ==
- 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 the core root 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:
+ 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 the core root are explored until a core.properties file is encountered, and that directory is assumed to be the instanceDir for that core. Subdirectories of any directory that has a core.properties file are NOT examined for additional cores. The core.properties file presently recognizes the following entries:
     * name - the name of the core. If not specified, the name comes from the containing directory.
     * 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.
@@ -66, +66 @@

     * collection - the collection to which this core belongs
     * roles - SolrCloud role definition
     * properties - properties file to override core definitions. TBD: This is probably obsolete since we're reading a properties file in the first place. Is there a use case for supporting this now?
-    * loadOnStartup - [true|false] this core should be loaded and a searcher opened when Solr starts.
+    * loadOnStartup - ['''true'''|false] this core should be loaded and a searcher opened when Solr starts.
-    * transient - [true|false] this core may be unloaded if the core cache exceeds transientCacheSize (defined in solr.propreties)
+    * transient - [true|'''false'''] this core may be unloaded if the core cache exceeds transientCacheSize (defined in solr.propreties)
     * coreNodeName - SolrCloud core node name
+ 
+ === Minimal core.properties file ===
+ Interestingly, the minimal core.properties file is empty. Say an empty core.properties file is discovered in /solr/home/core1. The name will default to "core1", the instanceDir to /solr/home/core1, the dataDir to /solr/home/core1/data etc.
  
  == Ignoring cores ==
  It's not hard to imagine that people will want to have the core discovery process temporarily ignore one or more cores. The easiest way to accomplish this would be to rename the core.properties file, e.g. core.properties.bak.