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

Kun Xi edited comment on SOLR-6307 at 9/19/14 4:00 PM:
-------------------------------------------------------

[~anuragsharma]

Here is how I reproduce the bug:

1. create a document schema with two fields
 - birth_year_is: multivalue int field
 - reservation_dts: multivalue datetime field

2. create a document with dummy data:
 - birth_year_is: [ 1960, 1970 ]
 - reservation_dts: ["2014-02-12T12:00:00Z",  "2014-07-16T12:00:00Z"]

3. try to remove 1970 from birth_year_is:
{code}
curl http://localhost:8080/update\?commit\=true -H 
'Content-type:application/json' -d '[{ "birth_year_is": { "remove": [1970]},  
"id": 1}]'
{code}

4. try to remove 2014-07-16T12:00:00Z from reservation_dts:
{code}
curl http://localhost:8080/update\?commit\=true -H 
'Content-type:application/json' -d '[{ "reservation_dts": { "remove": 
["2014-07-16T12:00:00Z"]},  "id": 1}]'
{code}

5. go to solr console and verify the two fields are *NOT* updated.



was (Author: kunxi):
[~anuragsharma]

Here is how I reproduce the bug:

1. create a document schema with two fields
 - birth_year_is: multivalue int field
 - reservation_dts: multivalue datetime field

2. create a document with dummy data:
 - birth_year_is: [ 1960, 1970 ]
 - reservation_dts: ["2014-02-12T12:00:00Z",  "2014-07-16T12:00:00Z"]

3. try to remove 1970 from birth_year_is:
{code}
curl http://localhost:8080/update\?commit\=true -H 
'Content-type:application/json' -d '[{ "birth_year_is": { "remove": [1970]},  
"id": 1}]'
{code}

4. try to remove 2014-07-16T12:00:00Z from reservation_dts:
curl http://localhost:8080/update\?commit\=true -H 
'Content-type:application/json' -d '[{ "reservation_dts": { "remove": 
["2014-07-16T12:00:00Z"]},  "id": 1}]'

5. go to solr console and verify the two fields are *NOT* updated.


> Atomic update remove does not work for int array or date array
> --------------------------------------------------------------
>
>                 Key: SOLR-6307
>                 URL: https://issues.apache.org/jira/browse/SOLR-6307
>             Project: Solr
>          Issue Type: Bug
>          Components: update
>    Affects Versions: 4.9
>            Reporter: Kun Xi
>              Labels: atomic, difficulty-medium, impact-medium
>
> Try to remove an element in the string array with curl:
> {code}
> curl http://localhost:8080/update\?commit\=true -H 
> 'Content-type:application/json' -d '[{ "attr_birth_year_is": { "remove": 
> [1960]},  "id": 1098}]'
> curl http://localhost:8080/update\?commit\=true -H 
> 'Content-type:application/json' -d '[{"reserved_on_dates_dts": {"remove": 
> ["2014-02-12T12:00:00Z", "2014-07-16T12:00:00Z", "2014-02-15T12:00:00Z", 
> "2014-02-21T12:00:00Z"]}, "id": 1098}]'
> {code}
> Neither of them works.
> The set and add operation for int array works. 
> The set, remove, and  add operation for string array works



--
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

Reply via email to