Solr
  1. Solr
  2. SOLR-530

Improve messages when parsing schema.xml

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3
    • Fix Version/s: 1.3
    • Component/s: None
    • Labels:
      None

      Description

      Improve exception messages in parsing schema.xml and catch common user mistakes.

      For example:

      1. If type is incorrect or omitted, the resulting exception message does not show the field name
      2. Forgetting to add multiValued="true" on a copyField destination is a common mistake. If a field is a destination for multiple copyFields, then this goes unnoticed until addition of documents fails with exception.
      1. SOLR-530.patch
        2 kB
        Shalin Shekhar Mangar

        Issue Links

          Activity

          Hide
          Shalin Shekhar Mangar added a comment -

          Adds field name to exception message for missing/incorrect type.

          If a field is a destination for multiple copyFields and it is not defined as multiValued=true, then it shows a Warning during schema parsing.

          Show
          Shalin Shekhar Mangar added a comment - Adds field name to exception message for missing/incorrect type. If a field is a destination for multiple copyFields and it is not defined as multiValued=true, then it shows a Warning during schema parsing.
          Hide
          Shalin Shekhar Mangar added a comment -

          I forgot to grant license to ASF for inclusion of code in the previous patch.

          Adds field name to exception message for missing/incorrect type.

          If a field is a destination for multiple copyFields and it is not defined as multiValued=true, then it shows a Warning during schema parsing.

          Show
          Shalin Shekhar Mangar added a comment - I forgot to grant license to ASF for inclusion of code in the previous patch. Adds field name to exception message for missing/incorrect type. If a field is a destination for multiple copyFields and it is not defined as multiValued=true, then it shows a Warning during schema parsing.
          Hide
          Hoss Man added a comment -

          Thanks for the patch Shalin,

          2 minor issues: you had an off by 1 error in your copyField counting, and since you added copyFieldTargetCounts (Map), we could eliminate copyFieldTarget (Set).

          Committed revision 646107.

          Show
          Hoss Man added a comment - Thanks for the patch Shalin, 2 minor issues: you had an off by 1 error in your copyField counting, and since you added copyFieldTargetCounts (Map), we could eliminate copyFieldTarget (Set). Committed revision 646107.

            People

            • Assignee:
              Hoss Man
              Reporter:
              Shalin Shekhar Mangar
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development