[ https://issues.apache.org/jira/browse/SOLR-6909?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14270431#comment-14270431 ]
Steve Davids edited comment on SOLR-6909 at 1/9/15 2:28 AM: ------------------------------------------------------------ The javascript approach is interesting but would seem overly complex when you always want the merging logic to work a specific way all the time. Additionally, I have a user case where I download a document in an update processor, extract fields from downloaded content, and index that document. The interesting thing here is that if I can't download the document I set the doc's status to error, though this is only valid if a good document *doesn't* already exists in the index, so if an error doc is trying to be merged on top of an existing document an exception is thrown and won't clobber the good document. As you can see with the approach taken in this ticket it allows you the added flexibility with a customizable AtomicUpdateDocumentMerger. Another added benefit is that it cleans up the DistributedUpdateProcessor a little. One modification I might want to make is to the attached patch is to make a `doSet` and `doAdd` which would be allow overrides of each specific merge type. was (Author: sdavids): The javascript approach is interesting but would seem overly complex when you always want the merging logic to work a specific way all the time. Additionally, I have a user case where I download a document in an update processor, extract fields from downloaded content, and index that document. The interesting thing here is that if I can't download the document I set the doc's status to error, though this is only valid if a good document already exists in the index, so if an error doc is trying to be merged an exception is thrown and won't clobber the good document. As you can see with the approach taken in this ticket it allows you the added flexibility with a customizable AtomicUpdateDocumentMerger. Another added benefit is that it cleans up the DistributedUpdateProcessor a little. One modification I might want to make is to the attached patch is to make a `doSet` and `doAdd` which would be allow overrides of each specific merge type. > Allow pluggable atomic update merging logic > ------------------------------------------- > > Key: SOLR-6909 > URL: https://issues.apache.org/jira/browse/SOLR-6909 > Project: Solr > Issue Type: Improvement > Reporter: Steve Davids > Fix For: 5.0, Trunk > > Attachments: SOLR-6909.patch > > > Clients should be able to introduce their own specific merging logic by > implementing a new class that will be used by the DistributedUpdateProcessor. > This is particularly useful if you require a custom hook to interrogate the > incoming document with the document that is already resident in the index as > there isn't the ability to perform that operation nor can you currently > extend the DistributedUpdateProcessor to provide the modifications. -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org