lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "AMRIT SARKAR (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SOLR-9530) Add an Atomic Update Processor
Date Tue, 14 Feb 2017 05:36:42 GMT

    [ https://issues.apache.org/jira/browse/SOLR-9530?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15865096#comment-15865096
] 

AMRIT SARKAR edited comment on SOLR-9530 at 2/14/17 5:36 AM:
-------------------------------------------------------------

Hi Varun, Alexandre, Noble,

SOLR-9530.patch uploaded for a new update processor - AtomicUpdateProcessor which which will
accept conventional key-value update document and convert them into atomic update document
for the fields specified in the processor definition. Fields which are not specified in the
processor parameters will be updated in conventional manner.

Files specified in the patch:
1. AtomicUpdateProcessorFactory.java
2. AtomicUpdateProcessorFactoryTest.java (test class for AtomicUpdateProcessorFactory)
3. solrconfig-atomic-update-processor.xml (sample solrconfig for AtomicUpdateProcessorFactoryTest
test cases)

As Alexandre mentioned, it will work as a standalone processor doing the conversion and updated
document will passed onto next processor defined.
Noble, this patch right now doesn't support accepting request params as it is difficult to
assign atomic operation to the respective field.

I will request you to review the patch and your feedback will be deeply appreciated.

Thanks
Amrit Sarkar


was (Author: sarkaramrit2@gmail.com):
Hi Varun, Alexandre, Noble,

SOLR-9530.patch uploaded for a new update processor - AtomicUpdateProcessor which which will
accept conventional key-value update document and convert them into atomic update document
for the fields specified in the processor definition. Fields which are not specified in the
processor parameters will be updated in conventional manner.

Files specified in the patch:
1. AtomicUpdateProcessorFactory
2. AtomicUpdateProcessorFactoryTest (test class for AtomicUpdateProcessorFactory)
3. solrconfig-atomic-update-processor.xml (sample solrconfig for AtomicUpdateProcessorFactoryTest
test cases)

As Alexandre mentioned, it will work as a standalone processor doing the conversion and updated
document will passed onto next processor defined.
Noble, this patch right now doesn't support accepting request params as it is difficult to
assign atomic operation to the respective field.

I will request you to review the patch and your feedback will be deeply appreciated.

Thanks
Amrit Sarkar

> Add an Atomic Update Processor 
> -------------------------------
>
>                 Key: SOLR-9530
>                 URL: https://issues.apache.org/jira/browse/SOLR-9530
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Varun Thacker
>         Attachments: SOLR-9530.patch
>
>
> I'd like to explore the idea of adding a new update processor to help ingest partial
updates.
> Example use-case - There are two datasets with a common id field. How can I merge both
of them at index time?
> Proposed Solution: 
> {code}
> <updateRequestProcessorChain name="atomic">
>   <processor class="solr.processor.AtomicUpdateProcessorFactory">
>     <str name="my_new_field">add</str>
>   </processor>
>   <processor class="solr.LogUpdateProcessorFactory" />
>   <processor class="solr.RunUpdateProcessorFactory" />
> </updateRequestProcessorChain>
> {code}
> So the first JSON dump could be ingested against {{http://localhost:8983/solr/gettingstarted/update/json}}
> And then the second JSON could be ingested against
> {{http://localhost:8983/solr/gettingstarted/update/json?processor=atomic}}
> The Atomic Update Processor could support all the atomic update operations currently
supported.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


Mime
View raw message