You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Amrit Sarkar (JIRA)" <ji...@apache.org> on 2017/10/17 21:43:00 UTC

[jira] [Comment Edited] (SOLR-11267) Add support for "add-distinct" atomic update operation

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

Amrit Sarkar edited comment on SOLR-11267 at 10/17/17 9:42 PM:
---------------------------------------------------------------

[~ichattopadhyaya],

I cooked up a little patch to support "add-distinct". I also believe this will be a very wealthy addition in atomic requests as users have to parse the SET from the list on their application code today.

Design: if field not present, do conventional "add" atomic operation or else:
              if passed values are list, check each value present already and then add
              else if singular, check value present already and then add

Included small test to verify that. Looking forward to your review and feedback.


was (Author: sarkaramrit2@gmail.com):
[~ichattopadhyaya],

I cooked up a little patch to support "add-distinct". I also believe this will be a very wealthy addition in atomic requests as users have to parse the SET from the list on their application code today.

Design: if field not present, do conventional "add" atomic operation or else:
              if passed values are list, check each value present already and then add
              else if singular, check each value present already and then add

Included small test to verify that. Looking forward to your review and feedback.

> Add support for "add-distinct" atomic update operation
> ------------------------------------------------------
>
>                 Key: SOLR-11267
>                 URL: https://issues.apache.org/jira/browse/SOLR-11267
>             Project: Solr
>          Issue Type: New Feature
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Ishan Chattopadhyaya
>            Assignee: Ishan Chattopadhyaya
>         Attachments: SOLR-11267.patch, SOLR-11267.patch
>
>
> Often, a multivalued field is used as a set of values. Since multivalued fields are more like lists than sets, users do two consecutive operations, remove and add, to insert an element into the field and also maintain the set's property of only having unique elements.
> Proposing a new single operation, called "add-distinct" (which essentially means "add-if-doesn't exist") for this.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

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