You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-commits@lucene.apache.org by Apache Wiki <wi...@apache.org> on 2011/02/27 16:07:34 UTC

[Solr Wiki] Update of "SolrConfigXml" by UweSchindler

Dear Wiki user,

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

The "SolrConfigXml" page has been changed by UweSchindler.
The comment on this change is: Change XInclude to reflect 3.1 behaviour.
http://wiki.apache.org/solr/SolrConfigXml?action=diff&rev1=38&rev2=39

--------------------------------------------------

  The following sample attempts to include solrconfig_master.xml.  If it doesn't exist or can't be loaded, then solrconfig_slave.xml will be used instead.  If solrconfig_slave.xml can't be loaded an XML parsing exception will result.
  
  {{{
-     <xi:include href="solr/conf/solrconfig_master.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
+     <xi:include href="solrconfig_master.xml" xmlns:xi="http://www.w3.org/2001/XInclude">
        <xi:fallback>
-         <xi:include href="solr/conf/solrconfig_slave.xml"/>
+         <xi:include href="solrconfig_slave.xml"/>
        </xi:fallback>
      </xi:include>
  }}}
@@ -473, +473 @@

  Notes:
  
   * Since the xinclude elements are handled by the XML parser and not by solr, properties expansion is not available.
-  * File paths in href attributes can be absolute or relative to the server's (jetty, tomcat, etc) current working directory.  They can also be HTTP URLs to fetch resources from remote servers if desired.
+  * File paths in href attributes can be absolute or relative to the current file's directory (this changed since Solr 3.1: before, the XIncludes were not resolved using the base directory of the current XML file, so the CWD was used - if you upgrade to 3.1, you may need to change you XInclude hrefs). If you want to ensure absolute links, use file:-URIs (e.g., "file:/etc/solr/solrconfig.xml") to refer to those files. By default Solr 3.1 will use the SolrResourceLoader to search for the referenced files, so it behaves like loading stopword files in the schema.  XIncludes can also be HTTP URLs to fetch resources from remote servers if desired.
-  * The Xerces parser, used by default in solr, doesn't support the xpointer="xpointer()" scheme.  http://xerces.apache.org/xerces2-j/faq-xinclude.html
+  * The Xerces parser, used by default in Solr, doesn't support the xpointer="xpointer()" scheme.  http://xerces.apache.org/xerces2-j/faq-xinclude.html