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 2010/01/23 17:35:49 UTC

[Solr Wiki] Update of "SolrConfigXml" by JanHoydahl

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 JanHoydahl.
The comment on this change is: Added UpdateRequestProcessorChain section.
http://wiki.apache.org/solr/SolrConfigXml?action=diff&rev1=31&rev2=32

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

    <requestHandler name="standard" class="solr.StandardRequestHandler" />
    <requestHandler name="custom" class="your.package.CustomRequestHandler" />
  }}}
+ == UpdateRequestProcessorChain section ==
+ This allows you to configure a processing chain that processes a document before indexing. The chain consists of [[UpdateRequestProcessor|UpdateRequestProcessors]], each doing some processing on the document. You can define multiple chains to use in different update request  handlers.
+ 
+ Example chain, commented out in solrconfig.xml:
+ 
+ {{{
+   <updateRequestProcessorChain name="dedupe">
+     <processor class="org.apache.solr.update.processor.SignatureUpdateProcessorFactory">
+       <bool name="enabled">true</bool>
+       <str name="signatureField">id</str>
+       <bool name="overwriteDupes">false</bool>
+       <str name="fields">name,features,cat</str>
+       <str name="signatureClass">org.apache.solr.update.processor.Lookup3Signature</str>
+     </processor>
+     <processor class="solr.LogUpdateProcessorFactory" />
+     <processor class="solr.RunUpdateProcessorFactory" />
+   </updateRequestProcessorChain
+ }}}
+ The chain is then referenced from your UpdateRequestHandler:
+ 
+ {{{
+   <requestHandler name="/update "class="solr.XmlUpdateRequestHandler">
+     <lst name="defaults">
+       <str name="update.processor">dedupe</str>
+     </lst>
+   </requestHandler>
+ }}}
  == The Highlighter plugin configuration section ==
  You can configure custom fragmenters and formatters for use in highlighting.  Each may be configured with its own set of highlighting parameter defaults.  See also HighlightingParameters.
  
@@ -407, +434 @@

  == XInclude ==
  <!> [[Solr1.4]]
  
- Portions of the solrconfig.xml file can be externalized and included using a standard xml feature called XInclude.  The easy to read specification for XInclude can be found at http://www.w3.org/TR/xinclude/ 
+ Portions of the solrconfig.xml file can be externalized and included using a standard xml feature called XInclude.  The easy to read specification for XInclude can be found at http://www.w3.org/TR/xinclude/
  
- This might be useful in cases where there are a number of settings that only differ if the server is a master or a slave.  These settings could be factored out into two separate files and then included as needed to avoid duplication of common portions of solrconfig.xml 
+ This might be useful in cases where there are a number of settings that only differ if the server is a master or a slave.  These settings could be factored out into two separate files and then included as needed to avoid duplication of common portions of solrconfig.xml
  
  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:fallback>
@@ -419, +447 @@

        </xi:fallback>
      </xi:include>
  }}}
- 
  solrconfig_master.xml might contain:
+ 
  {{{
  <requestHandler name="/replication" class="solr.ReplicationHandler" >
      <lst name="master">
@@ -430, +458 @@

      </lst>
  </requestHandler>
  }}}
- 
- 
  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.
   * The Xerces parser, used by default in solr, doesn't support the xpointer="xpointer()" scheme.  http://xerces.apache.org/xerces2-j/faq-xinclude.html