You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alexis Torres Paderewski (JIRA)" <ji...@apache.org> on 2012/06/01 17:07:23 UTC

[jira] [Created] (SOLR-3502) [Copy Field][Importing] Copy Field duplicate a field and a multivalued field can be created without having field multivalued in schema

Alexis Torres Paderewski created SOLR-3502:
----------------------------------------------

             Summary: [Copy Field][Importing] Copy Field duplicate a field and a multivalued field can be created without having field multivalued in schema
                 Key: SOLR-3502
                 URL: https://issues.apache.org/jira/browse/SOLR-3502
             Project: Solr
          Issue Type: Bug
          Components: clients - java
    Affects Versions: 3.1
         Environment: two Solr 3.1 on linux.
            Reporter: Alexis Torres Paderewski
            Priority: Minor


we have two field on both solr:


<field name="A" type="text" indexed="true" stored="true"/>
<field name="B" type="string" indexed="true" stored="true"/>

<copyField source="A" dest="B"/>

We have a SolrDocument reader (solrj client without pojo binding) that takes all docs from one solr and SolrInputDocument write them on the other solr.

On B field in the target solr we ended with an Array containing the duplicate value we have on the first solr. How could solr internally break schema ?



--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


[jira] [Updated] (SOLR-3502) [Copy Field][Importing] Copy Field duplicate a field and a multivalued field can be created without having field multivalued in schema

Posted by "Jack Krupansky (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-3502?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jack Krupansky updated SOLR-3502:
---------------------------------

    Attachment: SOLR-3502-4x.patch

I can repro the problem in 3.6.

The essence is that the copyField code checks to see if the destination field has already been set in the output Lucene document, but this doesn't catch the case where the setting of the destination in the SolrInputDocument occurs after the setting of the source field.

Patch for 4x branch is attached. Similar patch should be applied to trunk and 3.6.1. Tested for 4x.

                
> [Copy Field][Importing] Copy Field duplicate a field and a multivalued field can be created without having field multivalued in schema
> --------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SOLR-3502
>                 URL: https://issues.apache.org/jira/browse/SOLR-3502
>             Project: Solr
>          Issue Type: Bug
>          Components: clients - java
>    Affects Versions: 3.1
>         Environment: two Solr 3.1 on linux.
>            Reporter: Alexis Torres Paderewski
>            Priority: Minor
>              Labels: newbie
>         Attachments: SOLR-3502-4x.patch
>
>   Original Estimate: 24h
>  Remaining Estimate: 24h
>
> we have two field on both solr:
> <field name="A" type="text" indexed="true" stored="true"/>
> <field name="B" type="string" indexed="true" stored="true"/>
> <copyField source="A" dest="B"/>
> We have a SolrDocument reader (solrj client without pojo binding) that takes all docs from one solr and SolrInputDocument write them on the other solr.
> On B field in the target solr we ended with an Array containing the duplicate value we have on the first solr. How could solr internally break schema ?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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