Solr
  1. Solr
  2. SOLR-5598

LanguageIdentifierUpdateProcessor ignores all but the first value of multiValued string fields

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 4.5.1
    • Fix Version/s: 4.7, 6.0
    • Component/s: contrib - LangId
    • Labels:
      None

      Description

      The LanguageIdentifierUpdateProcessor just uses the first value of the multiValued field to detect the language.

      Method concatFields calls doc.getFieldValue(fieldName) but should instead iterate over doc.getFieldValues(fieldName).

      1. SOLR-5598.patch
        8 kB
        Shalin Shekhar Mangar
      2. SOLR-5598.patch
        8 kB
        Vitaliy Zhovtyuk
      3. SOLR-5598.patch
        2 kB
        Andreas Hubold

        Activity

        Hide
        Andreas Hubold added a comment -

        patch with simple fix attached

        Show
        Andreas Hubold added a comment - patch with simple fix attached
        Hide
        Vitaliy Zhovtyuk added a comment -

        Added content logging in case of non-string value
        Added test for multivalue field with 1st value as empty string
        Added test for multivalue field with values in 2languages (most en). resolved as en.

        Show
        Vitaliy Zhovtyuk added a comment - Added content logging in case of non-string value Added test for multivalue field with 1st value as empty string Added test for multivalue field with values in 2languages (most en). resolved as en.
        Hide
        Shalin Shekhar Mangar added a comment -

        Thanks Vitaliy!

        This patch removes the empty exception javadoc line (it causes "Javadoc: Description expected after this reference" errors). I also removed "content" from the log warning.

        In future, please run "ant precommit" from the checkout directory which will catch usage of forbidden-apis as well as javadoc errors.

        Show
        Shalin Shekhar Mangar added a comment - Thanks Vitaliy! This patch removes the empty exception javadoc line (it causes "Javadoc: Description expected after this reference" errors). I also removed "content" from the log warning. In future, please run "ant precommit" from the checkout directory which will catch usage of forbidden-apis as well as javadoc errors.
        Hide
        ASF subversion and git services added a comment -

        Commit 1564732 from shalin@apache.org in branch 'dev/trunk'
        [ https://svn.apache.org/r1564732 ]

        SOLR-5598: LanguageIdentifierUpdateProcessor ignores all but the first value of multiValued string fields

        Show
        ASF subversion and git services added a comment - Commit 1564732 from shalin@apache.org in branch 'dev/trunk' [ https://svn.apache.org/r1564732 ] SOLR-5598 : LanguageIdentifierUpdateProcessor ignores all but the first value of multiValued string fields
        Hide
        ASF subversion and git services added a comment -

        Commit 1564733 from shalin@apache.org in branch 'dev/branches/branch_4x'
        [ https://svn.apache.org/r1564733 ]

        SOLR-5598: LanguageIdentifierUpdateProcessor ignores all but the first value of multiValued string fields

        Show
        ASF subversion and git services added a comment - Commit 1564733 from shalin@apache.org in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1564733 ] SOLR-5598 : LanguageIdentifierUpdateProcessor ignores all but the first value of multiValued string fields
        Hide
        Shalin Shekhar Mangar added a comment -

        Thanks Andreas and Vitaliy!

        Show
        Shalin Shekhar Mangar added a comment - Thanks Andreas and Vitaliy!

          People

          • Assignee:
            Shalin Shekhar Mangar
            Reporter:
            Andreas Hubold
          • Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development