You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Noble Paul (JIRA)" <ji...@apache.org> on 2008/07/25 09:09:31 UTC

[jira] Updated: (SOLR-269) UpdateRequestProcessorFactory - process requests before submitting them

     [ https://issues.apache.org/jira/browse/SOLR-269?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Noble Paul updated SOLR-269:
----------------------------

    Attachment: SOLR-269-simple.patch

A very simple implementation. No factory. No state 
The attached patch has not removed the existing stuff and it is not a working model . But it demonstrates how you can put in a simpler API . The design is inspired by the _ServletFilter_ API. but without the _filterChain.doFilter()_ part.(it relies on the return code)  

The configuration format is 
{code:xml}
<updateRequestProcessorChain>
  <processor class="com.MyUpdateProcessor" />
  <processor class="solr.RunUpdateProcessor" />
</updateRequestProcessor>

<!-- Another one -->
<updateRequestProcessorChain name="alternate">
  <processor class="org.apache.solr.ConditionalCopyProcessor" />
  <processor class="solr.RunUpdateProcessor" />
  <processor class="solr.LogUpdateProcessor" />
</updateRequestProcessorChain>
{code}
The usage must be as follows
{code:java}
solrCore.getUpdateProcessorChain(name).processXXX(command,  solrQueryRequest, solrQueryResponse);
{code}

this patch relies on SOLR-614 for simplifying configuration

> UpdateRequestProcessorFactory - process requests before submitting them
> -----------------------------------------------------------------------
>
>                 Key: SOLR-269
>                 URL: https://issues.apache.org/jira/browse/SOLR-269
>             Project: Solr
>          Issue Type: New Feature
>            Reporter: Ryan McKinley
>            Assignee: Ryan McKinley
>             Fix For: 1.3
>
>         Attachments: SOLR-269-simple.patch, SOLR-269-UpdateRequestProcessorFactory.patch, SOLR-269-UpdateRequestProcessorFactory.patch, SOLR-269-UpdateRequestProcessorFactory.patch, UpdateProcessor.patch
>
>
> A simple UpdateRequestProcessor was added to a bloated SOLR-133 commit. 
> An UpdateRequestProcessor lets clients plug in logic after a document has been parsed and before it has been 'updated' with the index.  This is a good place to add custom logic for:
>  * transforming the document fields
>  * fine grained authorization (can user X updated document Y?)
>  * allow update, but not delete (by query?)
>    <requestHandler name="/update" class="solr.StaxUpdateRequestHandler" >
>      <str name="update.processor.class">org.apache.solr.handler.UpdateRequestProcessor</str>
>      <lst name="update.processor.args">
>       ... (optionally pass in arguments to the factory init method) ...
>      </lst> 
>    </requestHandler>
> http://www.nabble.com/Re%3A-svn-commit%3A-r547495---in--lucene-solr-trunk%3A-example-solr-conf-solrconfig.xml-src-java-org-apache-solr-handler-StaxUpdateRequestHandler.java-src-java-org-apache-solr-handler-UpdateRequestProcessor.jav-tf3950072.html#a11206583

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