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

Steve Rowe commented on SOLR-4650:
----------------------------------

{quote}
Yes, I hadn't seen SOLR-4567, but not sure if your fix for that will be good 
enough here.

It depends how the pattern matching is done, but as it stands headline_* won't 
match any static field but it could generate a match with the dynamic field 
*_en (and in our case it does)? But is is non-trivial to work that out, since 
the wildcards don't make for easy comparison (one at the start, one at the end).
{quote}

Yeah, this is definitely a different case from SOLR-4567.  AFAICT, there is no 
way to align the copyField source in your scenario to declared dynamic or 
explicit fields, and changes I introduced in SOLR-3798 and SOLR-4567 assume 
that non-aligned copyField sources are errors.

bq. I think this is more than the "subset pattern" as defined in SOLR-4567, but 
I can't see any other way to do what we want (and it used to work!)

Yup, it's definitely a regression.  See above for a workaround.
                
> copyField doesn't work with patterns that don't match dynamic fields
> --------------------------------------------------------------------
>
>                 Key: SOLR-4650
>                 URL: https://issues.apache.org/jira/browse/SOLR-4650
>             Project: Solr
>          Issue Type: Bug
>          Components: Schema and Analysis
>    Affects Versions: 4.2
>            Reporter: Daniel Collins
>            Assignee: Steve Rowe
>
> We have a schema that is currently on Solr 4.0 and supports language-specific 
> stemming for content by use of dynamic fields and copyFields.
> Sample of schema:
> {code:xml}
>    <field name="headline" type="text_general" indexed="true" stored="true" 
> required="false" omitNorms="true"/>
>    <field name="body" type="text_general" indexed="true" stored="false" 
> required="false" omitNorms="true"/>
>    <dynamicField name="*_en" type="text_en" indexed="true" stored="false" 
> multiValued="true" omitNorms="true"/>
>    <dynamicField name="*_ja" type="text_ja" indexed="true" stored="false" 
> multiValued="true" omitNorms="true"/>
>    <dynamicField name="*_fr" type="text_fr" indexed="true" stored="false" 
> multiValued="true" omitNorms="true"/>
>    <dynamicField name="*_de" type="text_de" indexed="true" stored="false" 
> multiValued="true" omitNorms="true"/>
>    <dynamicField name="*_es" type="text_es" indexed="true" stored="false" 
> multiValued="true" omitNorms="true"/>
>    <dynamicField name="*_pt" type="text_pt" indexed="true" stored="false" 
> multiValued="true" omitNorms="true"/>
>       ...
>    <copyField source="headline_*" dest="headline"/>
>    <copyField source="body_*" dest="body"/>
> {code}
> The aim is to store language-specific (stemmed) text in the headline_en, 
> body_en, ... fields and then generic versions (no stemming) in headline & 
> body. This works fine in 4.0 and 4.1, but now fails to start in 4.2,
> {noformat}
> SEVERE: Unable to create core: collection1
> org.apache.solr.common.SolrException: copyField source :'headline_*' is not 
> an explicit field and doesn't match a dynamicField.
>         at 
> org.apache.solr.schema.IndexSchema.registerCopyField(IndexSchema.java:688)
> {noformat}
> Shouldn't this still work?

--
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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to