[ https://issues.apache.org/jira/browse/SOLR-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12510574 ]
Ryan McKinley commented on SOLR-269: ------------------------------------ > I don't see any code allowing initialization of the transform chain, or > anything like that. > What are you proposing? Check the latest patch. I'm not sure we need to have XML configuration for this, but I added it as an example. The factory would hold a list of transformers: <transformer class="MyConditionalCopyField" /> <transformer class="SynonymCleaner" /> <transformer class="RunAnalyzerAndStoreAsMultiValuedFields"> > Is there a downside to the logging being separated out in this case? only that it justifies the UpdateRequestProcessorFactory chain ;) - - - - - This patch includes a UpdateRequestProcessorChainFactory - this is a UpdateRequestProcessorFactory that keeps a chain of UpdateRequestProcessorFactories and iterates through them. This pointed out another thing I don't like about the chain pattern. I need a custom UpdateRequestProcessor that checks all the requests before executing any of them. I plan to store the valid commands in a list and only execute them in the finish() call. I'm not sure how to map that plan to an chain. How would I pass the output from one processor to the next? > 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-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.