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

CSV Update Handler Needs to be updated for new field guessing

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 4.3
    • Fix Version/s: 4.4, 6.0
    • Component/s: None
    • Labels:
      None

      Description

      The CSV Update handler throws an exception if a field doesn't exist. Given the new schemaless stuff, we probably shouldn't do this.

      1. SOLR-5037.patch
        4 kB
        Erik Hatcher
      2. SOLR-5037.patch
        5 kB
        Steve Rowe

        Issue Links

          Activity

          Hide
          steve_rowe Steve Rowe added a comment -

          Bulk close resolved 4.4 issues

          Show
          steve_rowe Steve Rowe added a comment - Bulk close resolved 4.4 issues
          Hide
          steve_rowe Steve Rowe added a comment -

          Committed to trunk, branch_4x and lucene_solr_4_4.

          Thanks Erik!

          Show
          steve_rowe Steve Rowe added a comment - Committed to trunk, branch_4x and lucene_solr_4_4. Thanks Erik!
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1504751 from Steve Rowe in branch 'dev/branches/lucene_solr_4_4'
          [ https://svn.apache.org/r1504751 ]

          SOLR-5037: The CSV loader now accepts field names that are not in the schema. (merged trunk r1504747)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1504751 from Steve Rowe in branch 'dev/branches/lucene_solr_4_4' [ https://svn.apache.org/r1504751 ] SOLR-5037 : The CSV loader now accepts field names that are not in the schema. (merged trunk r1504747)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1504748 from Steve Rowe in branch 'dev/branches/branch_4x'
          [ https://svn.apache.org/r1504748 ]

          SOLR-5037: The CSV loader now accepts field names that are not in the schema. (merged trunk r1504747)

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1504748 from Steve Rowe in branch 'dev/branches/branch_4x' [ https://svn.apache.org/r1504748 ] SOLR-5037 : The CSV loader now accepts field names that are not in the schema. (merged trunk r1504747)
          Hide
          jira-bot ASF subversion and git services added a comment -

          Commit 1504747 from Steve Rowe in branch 'dev/trunk'
          [ https://svn.apache.org/r1504747 ]

          SOLR-5037: The CSV loader now accepts field names that are not in the schema.

          Show
          jira-bot ASF subversion and git services added a comment - Commit 1504747 from Steve Rowe in branch 'dev/trunk' [ https://svn.apache.org/r1504747 ] SOLR-5037 : The CSV loader now accepts field names that are not in the schema.
          Hide
          ehatcher Erik Hatcher added a comment -

          Steve - +1. You wanna run with what you've done? Thanks!

          Show
          ehatcher Erik Hatcher added a comment - Steve - +1. You wanna run with what you've done? Thanks!
          Hide
          steve_rowe Steve Rowe added a comment -

          Erik, in your patch you asked:

             String[] fieldnames;
          -  SchemaField[] fields;
          +  String[] fields;    // still need to keep this?  or would 'fieldnames' be enough?
          

          The attached patch, based on yours, removes the fields array, substituting the fieldnames array for it in most places, and switching to using null entries from the adders array to indicate which field(s) should be skipped.

          All Solr tests pass.

          +1 to get this in before the 4.4 respin.

          Show
          steve_rowe Steve Rowe added a comment - Erik, in your patch you asked: String [] fieldnames; - SchemaField[] fields; + String [] fields; // still need to keep this ? or would 'fieldnames' be enough? The attached patch, based on yours, removes the fields array, substituting the fieldnames array for it in most places, and switching to using null entries from the adders array to indicate which field(s) should be skipped. All Solr tests pass. +1 to get this in before the 4.4 respin.
          Hide
          ehatcher Erik Hatcher added a comment -

          Here's a first quick patch (from trunk, but should apply clean to 4x too), but might just be all that's needed.

          Show
          ehatcher Erik Hatcher added a comment - Here's a first quick patch (from trunk, but should apply clean to 4x too), but might just be all that's needed.

            People

            • Assignee:
              steve_rowe Steve Rowe
              Reporter:
              gsingers Grant Ingersoll
            • Votes:
              1 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development