Solr
  1. Solr
  2. SOLR-5037

CSV Update Handler Needs to be updated for new field guessing

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor 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
        5 kB
        Steve Rowe
      2. SOLR-5037.patch
        4 kB
        Erik Hatcher

        Issue Links

          Activity

          Hide
          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
          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.
          Hide
          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 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
          Erik Hatcher added a comment -

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

          Show
          Erik Hatcher added a comment - Steve - +1. You wanna run with what you've done? Thanks!
          Hide
          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
          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
          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
          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
          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
          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
          Steve Rowe added a comment -

          Committed to trunk, branch_4x and lucene_solr_4_4.

          Thanks Erik!

          Show
          Steve Rowe added a comment - Committed to trunk, branch_4x and lucene_solr_4_4. Thanks Erik!
          Hide
          Steve Rowe added a comment -

          Bulk close resolved 4.4 issues

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development