Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-4650

copyField doesn't work with source globs that don't match dynamic fields

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 4.2
    • Fix Version/s: 4.3, 6.0
    • Component/s: Schema and Analysis
    • Labels:
      None

      Description

      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:

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

      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,

      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)
      

      Shouldn't this still work?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                steve_rowe Steve Rowe
                Reporter:
                dancollins Daniel Collins
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: