Differences between revisions 6 and 7
Revision 6 as of 2013-05-21 15:03:53
Size: 4214
Editor: ShawnHeisey
Comment: minor reorg.
Revision 7 as of 2013-05-21 15:06:14
Size: 4228
Editor: ShawnHeisey
Comment: combined first two paragraphs.
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
<!> [[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 and not fixed until 4.4. Using the [[Solr.xml (supported through 4.x)|old style solr.xml]] is recommended until Solr4.4 is released. If you want to experiment with it now, download the source code or a nightly build for branch_4x.
<!> [[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 until Solr4.4 is released. If you want to experiment with it now, download the source code or a nightly build for branch_4x.

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 old style solr.xml is recommended until Solr4.4 is released. If you want to experiment with it now, download the source code or a nightly build for branch_4x.

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!

Essentially, cores are no longer defined in in solr.xml. In fact, solr.xml is no longer necessary at all and will be obsoleted in Solr 5.x. As of Solr 4.3 the process is as follows:

  • If a solr.xml file is found in <SOLR_HOME>, then it is expected to be the old-style solr.xml that defines cores etc.

  • If there is no solr.xml but there is a solr.properties file, then exploration-based core enumeration is assumed.

  • If neither a solr.xml nor an solr.properties file is found, a default solr.xml file is assumed. NOTE: as of 5.0, this will not be true and an error will be thrown if no solr.properties file is found.
  • If a solr.properties file is found, all the information that used to be available in solr.xml is defined available here except there should be no core information. It's a straightforward mapping from the old schema.xml <solr> and <cores> nodes to the properties file version. See Solr.xml (pre 5.x) for their meanings <!> TODO: put the rest of the definitions here rather than reference an obsolete page!.

    • persistent [true|false] Whether to persist any changes to the files on disk, both solr.properties and the individual core.properties files. Defaults to false.
    • sharedLib
    • zkHost
    • cores.hostPort
    • cores.adminPath
    • cores.defaultCoreName
    • cores.shareSchema - soon to be obsolete. Real Soon Now (see SOLR-4478), configSets will be implemented. This will implicitly support sharing schemas, solrconfig, etc in alignment with SolrCloud initiatives.

    • cores.hostContext
    • cores.zkClientTimeout
    • cores.transientCacheSize - The number of cores that can be loaded before closing older ones on an LRU basis. Only cores defined with transient=true (see below) are placed in this cache.
    • cores.adminHandler

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.
  • config - the configuration file. Defaults to solrconfig.xml
  • instanceDir - the directory for this core. Usually you should just leave this out, it defaults to the directory that core.properties is in.
  • 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.
  • schema - the schema file. Defaults to schema.xml
  • shard - the shard ID.
  • 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.
  • transient - [true|false] this core may be unloaded if the core cache exceeds transientCacheSize (defined in solr.propreties)
  • coreNodeName - SolrCloud core node name

Core Discovery (4.4 and beyond) (last edited 2018-03-02 22:21:05 by ShawnHeisey)