[ 
https://issues.apache.org/jira/browse/SOLR-4588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

John Crygier updated SOLR-4588:
-------------------------------

    Affects Version/s: 4.2
    
> Partial Update of Poly Field Corrupts Data
> ------------------------------------------
>
>                 Key: SOLR-4588
>                 URL: https://issues.apache.org/jira/browse/SOLR-4588
>             Project: Solr
>          Issue Type: Bug
>    Affects Versions: 4.0, 4.2
>            Reporter: John Crygier
>            Priority: Minor
>         Attachments: schema.xml
>
>
> When updating a field that is a poly type (Testing with LatLonType), when you 
> do a partial document update, the poly fields will become multi-valued.  This 
> occurs even when the field is configured to not be multi-valued.
> Test Case
> Use the attached schema (schema.xml)
> And issue the following commands (With responses):
> curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d '[{"id":"JohnTestDocument", 
> "JohnTestLatLon" : "0,0"}]'
> RESPONSE: {"responseHeader":{"status":0,"QTime":2133}}
> curl 'http://localhost:8983/solr/select?q=*%3A*&wt=json&indent=true'
> RESPONSE: {
>   "responseHeader":{
>     "status":0,
>     "QTime":2,
>     "params":{
>       "indent":"true",
>       "q":"*:*",
>       "wt":"json"}},
>   "response":{"numFound":1,"start":0,"docs":[
>       {
>         "id":"JohnTestDocument",
>         "JohnTestLatLon_0_coordinate":0.0,
>         "JohnTestLatLon_1_coordinate":0.0,
>         "JohnTestLatLon":"0,0",
>         "_version_":-1596981248}]
>   }}
>   
> curl 'localhost:8983/solr/update?commit=true' -H 
> 'Content-type:application/json' -d 
> '[{"id":"JohnTestDocument","JohnTestLatLon":{"set":"5,7"}}]'
> RESPONSE: {"responseHeader":{"status":0,"QTime":218}}
> curl 'http://localhost:8983/solr/select?q=*%3A*&wt=json&indent=true'
> RESPONSE: {
>   "responseHeader":{
>     "status":0,
>     "QTime":2,
>     "params":{
>       "indent":"true",
>       "q":"*:*",
>       "wt":"json"}},
>   "response":{"numFound":1,"start":0,"docs":[
>       {
>         "id":"JohnTestDocument",
>         "JohnTestLatLon_0_coordinate":[0.0,
>           5.0],
>         "JohnTestLatLon_1_coordinate":[0.0,
>           7.0],
>         "JohnTestLatLon":"5,7",
>         "_version_":-118489088}]
>   }}
> As you can see, the 0.0 hangs around in JohnTestLatLon_0_coordinate and 
> JohnTestLatLon_1_coordinate.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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

Reply via email to