lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Solr Wiki] Update of "SolrConfigXml" by DanielLoNigro
Date Tue, 13 Nov 2012 03:31:56 GMT
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 DanielLoNigro:
http://wiki.apache.org/solr/SolrConfigXml?action=diff&rev1=58&rev2=59

Comment:
Add includes via document entities

   * 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
  
+ == Includes via Document Entities ==
+ An alternate way of doing includes is to use Document Entities.
+ 
+ At the top of solrconfig.xml:
+ 
+ {{{
+ <?xml version="1.0" encoding="UTF-8" ?>
+ <!DOCTYPE config [ 
+ 	<!ENTITY exampleinclude SYSTEM "example.xml">
+ ]>
+ }}}
+ 
+ Where example.xml contains the XML segment you want to import. To use it, just use &entityname;
(eg. &exampleinclude;) wherever you like.
+ 
+ See: http://lucene.472066.n3.nabble.com/XInclude-Multiple-Elements-td3167658.html
+ 

Mime
View raw message