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

fieldType capitalization is not consistent with the rest of case-sensitive field names

    Details

      Description

      For legacy reasons, both fieldtype and fieldType are acceptable in schema.xml. However, XML is case sensitive and this causes confusion when people see both fieldtype and fieldType used in official examples.

      This causes them to assume that maybe our particular XML is not case sensitive and then they mis-case other elements, such as dynamicField, which are then silently ignored.

      1. SOLR-6826.patch
        246 kB
        Alexandre Rafalovitch
      2. SOLR-6826.patch
        245 kB
        Erick Erickson

        Activity

        Hide
        erickerickson Erick Erickson added a comment -

        Thanks Alexandre!

        Show
        erickerickson Erick Erickson added a comment - Thanks Alexandre!
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1645373 from Erick Erickson in branch 'dev/branches/branch_5x'
        [ https://svn.apache.org/r1645373 ]

        SOLR-6826: fieldType capitalization is not consistent with the rest of case-sensitive field names

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1645373 from Erick Erickson in branch 'dev/branches/branch_5x' [ https://svn.apache.org/r1645373 ] SOLR-6826 : fieldType capitalization is not consistent with the rest of case-sensitive field names
        Hide
        jira-bot ASF subversion and git services added a comment -

        Commit 1645349 from Erick Erickson in branch 'dev/trunk'
        [ https://svn.apache.org/r1645349 ]

        SOLR-6826: fieldType capitalization is not consistent with the rest of case-sensitive field names

        Show
        jira-bot ASF subversion and git services added a comment - Commit 1645349 from Erick Erickson in branch 'dev/trunk' [ https://svn.apache.org/r1645349 ] SOLR-6826 : fieldType capitalization is not consistent with the rest of case-sensitive field names
        Hide
        erickerickson Erick Erickson added a comment -

        Alexandre's patch with CHANGES.txt attribution.

        Show
        erickerickson Erick Erickson added a comment - Alexandre's patch with CHANGES.txt attribution.
        Hide
        arafalov Alexandre Rafalovitch added a comment -

        Thanks Erick.

        And yes, the code has not been touched. We are just not advertising the legacy approach anymore by being inconsistent ourselves.

        Show
        arafalov Alexandre Rafalovitch added a comment - Thanks Erick. And yes, the code has not been touched. We are just not advertising the legacy approach anymore by being inconsistent ourselves.
        Hide
        erickerickson Erick Erickson added a comment -

        Yeah, I'm all for consistency, and case sensitivity is somewhat hit-or-miss as you point out.

        I'd be hard-pressed to advocate changing the code to break on lower-case fieldtype
        for instance since it'd break existing schemas (including some we went out!).

        Anyway, I'll commit this this soon..

        Erick

        Show
        erickerickson Erick Erickson added a comment - Yeah, I'm all for consistency, and case sensitivity is somewhat hit-or-miss as you point out. I'd be hard-pressed to advocate changing the code to break on lower-case fieldtype for instance since it'd break existing schemas (including some we went out!). Anyway, I'll commit this this soon.. Erick
        Hide
        arafalov Alexandre Rafalovitch added a comment -

        I have updated all the schema definitions and a couple of refering comments to consistently use fieldType everywhere.

        The code will still accept fieldtype if used, but at least all user examples are consistent.

        I could not find the specific test that would check for this, but all the general tests (ant test) pass.

        Show
        arafalov Alexandre Rafalovitch added a comment - I have updated all the schema definitions and a couple of refering comments to consistently use fieldType everywhere. The code will still accept fieldtype if used, but at least all user examples are consistent. I could not find the specific test that would check for this, but all the general tests (ant test) pass.

          People

          • Assignee:
            erickerickson Erick Erickson
            Reporter:
            arafalov Alexandre Rafalovitch
          • Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development