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

Erick Erickson commented on SOLR-3862:
--------------------------------------

Hmmm, I don't have  strong preferences. I'm always torn between "adding this in 
while we're about it" and waiting  for someone to chime in that they have a 
use-case for this functionality.

I started out thinking that remove/add would satisfy replace, but that pair 
doesn't handle two use-cases that come to mind:
1> you have multiple values that match the regex in remove that you want to 
update-but-preseve. Imagine your field has
run
running
runners
and you wanted the result to be
run
run$
run$
I don't see how remove/add would accomplish this in the regex case (say run.*). 
The remove would delete "running" and "runners" and you wouldn't know how many 
values to re-add.

2> Similarly, if you have two multiValued fields that are expected to be kept 
in parallel and wanted to update only one field. I'm assuming that the remove 
from one field and subsequent add would put the original value at the end 
rather then the original position.

So let's put it back and beef up the tests.   [[email protected]] any  thoughts?

> add "remove" as update option for atomically removing a value from a 
> multivalued field
> --------------------------------------------------------------------------------------
>
>                 Key: SOLR-3862
>                 URL: https://issues.apache.org/jira/browse/SOLR-3862
>             Project: Solr
>          Issue Type: Improvement
>          Components: SolrCloud
>    Affects Versions: 4.0-BETA
>            Reporter: Jim Musil
>            Assignee: Erick Erickson
>         Attachments: SOLR-3862-2.patch, SOLR-3862-3.patch, SOLR-3862-4.patch, 
> SOLR-3862.patch, SOLR-3862.patch
>
>
> Currently you can atomically "add" a value to a multivalued field. It would 
> be useful to be able to "remove" a value from a multivalued field. 
> When you "set" a multivalued field to null, it destroys all values.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to