lucene-solr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bryan Talbot (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SOLR-1167) Support module xml config files using XInclude
Date Mon, 18 May 2009 23:22:45 GMT

    [ https://issues.apache.org/jira/browse/SOLR-1167?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12710537#action_12710537
] 

Bryan Talbot commented on SOLR-1167:
------------------------------------

Support for xinclude will allow a few options to include xml (or non-xml) content from an
external file.  The external file can be loaded from the file system or from any HTTP resource.

Here are some examples:

  <!-- include solrconfig_master.xml from the file system and generate an error if the
file can't be found -->
  <xi:include href="solr/conf/solrconfig_master.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>


  <!-- include solrconfig_master.xml from an HTTP URL and ignore it if it's missing -->
  <xi:include href="http://localhost:8983/solr/admin/file/?file=replication_master.xml"

                    xmlns:xi="http://www.w3.org/2001/XInclude">
    </xi:fallback/>
  </xi:include>


  <!-- include solrconfig_master.xml from the filesystem.  If it cannot be found, attempt
        to include solrconfig_slave.xml from the filesystem.  If neither file can be found,
don't
        generate an error.
     -->
  <xi:include href="solr/conf/solrconfig_master.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback>
      <xi:include href="solr/conf/solrconfig_slave.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
        <xi:fallback/>
      </xi:include>
    </xi:fallback>
  </xi:include>


  <!-- attempt to include an optional file containing index options.  If the file can't
be found, fall back to some
        default values.
   -->
  <xi:include href="solr/conf/solrconfig_indexOptions.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
    <xi:fallback>
      <useCompoundFile>false</useCompoundFile>
      <ramBufferSizeMB>32</ramBufferSizeMB>
      <mergeFactor>10</mergeFactor>
      <maxMergeDocs>2147483647</maxMergeDocs>
      <maxFieldLength>10000</maxFieldLength>
    </xi:fallback>
  </xi:include>


I'll update the patch to include solrconfig_master.xml and solrconfig_slave.xml files if they
are present in the solr/conf directory.  The inclusions are currently commented out and the
resulting configuration is equivalent to the existing sample config.



> Support module xml config files using XInclude
> ----------------------------------------------
>
>                 Key: SOLR-1167
>                 URL: https://issues.apache.org/jira/browse/SOLR-1167
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Bryan Talbot
>            Priority: Minor
>         Attachments: SOLR-1167.patch
>
>
> Current configuration files (schema and solrconfig) are monolithic which can make maintenance
and reuse more difficult that it needs to be.  The XML standards include a feature to include
content from external files.  This is described at http://www.w3.org/TR/xinclude/
> This feature is to add support for XInclude features for XML configuration files.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message