You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Cassandra Targett (JIRA)" <ji...@apache.org> on 2018/01/10 20:35:00 UTC

[jira] [Updated] (SOLR-4588) Partial Update of Poly Field Corrupts Data

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

Cassandra Targett updated SOLR-4588:
------------------------------------
    Component/s: update
                 Schema and Analysis

> Partial Update of Poly Field Corrupts Data
> ------------------------------------------
>
>                 Key: SOLR-4588
>                 URL: https://issues.apache.org/jira/browse/SOLR-4588
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis, update
>    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 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