[
https://issues.apache.org/jira/browse/SOLR-269?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12616949#action_12616949
]
Shalin Shekhar Mangar commented on SOLR-269:
--------------------------------------------
bq. This gets overly complex too... do we add a special init() function? would
everything need a factory, but it may or may not be used?
No, why would we need special methods or a factory? Just the init/inform will
be fine. Just that they would be called once in their scope. Am I missing
something?
I don't really care about sharing objects across requests. My motivation is
only to help make the API simpler.
bq. Consider the buffering example... how would I be able to call all buffered
functions on finish()? What if I want a processor to make sure only one
document is sent at a time?
I see your point here. The next UpdateProcessor or a Servlet FilterChain like
design will be necessary in that case.
Let me think more on this since I've obviously under-estimated the use-cases
for this API. I always thought that one should do heavy-duty processing like
authentication etc. on the client side before sending documents to Solr or else
one should extend/write an UpdateHandler.
> 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.