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

copyField source glob matching explicit field(s) stopped working in Solr 4.2

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2
    • 4.2.1, 4.3, 6.0
    • Schema and Analysis
    • None

    Description

      Alexandre Rafalovitch reported on the solr-user mailing list http://markmail.org/message/sqhzxaet55wztldq that a copyField directive that worked under Solr 4.1 has stopped working under Solr 4.2:

      <field name="addr_from" type="email" indexed="true" stored="true" required="true" />
      <field name="addr_to" type="email" multiValued="true" indexed="true" stored="true" required="true" />
      <copyField source="addr_*" dest="text" />
      

      I'm 99% sure that matching multiple explicit fields is not the problem, but rather the issue is that I committed changes under SOLR-4503 to handle additional previously unhandled changes, but I didn't consider this case, and so introduced the regression. The table on SOLR-3798 that attempted to describe all possible combinations of copyField directives does not include this case.

      UPDATE: Workaround: instead of using a single copyField directive matching multiple explicit source fields, like the above example, use multiple copyField directives, each giving an explicit field name. So the above example using this workaround would be:

      <field name="addr_from" type="email" indexed="true" stored="true" required="true" />
      <field name="addr_to" type="email" multiValued="true" indexed="true" stored="true" required="true" />
      <copyField source="addr_from" dest="text" />
      <copyField source="addr_to" dest="text" />
      

      Attachments

        1. SOLR-4567.patch
          16 kB
          Steven Rowe

        Issue Links

          Activity

            People

              sarowe Steven Rowe
              sarowe Steven Rowe
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: