Solr
  1. Solr
  2. SOLR-852

Refactor common code in various handlers for working with ContentStream Objects

    Details

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

      Description

      See http://lucene.markmail.org/message/srbnucwor6kyxv2e?q=ContentStream+refactor

      There is a fair amount of shared code between the XMLUpdateRequestHandler and the CSVRequestHandler (and the soon to be RichDocumentHandler). Let's refactor into a common set of reusable pieces.

      1. SOLR-852.patch
        42 kB
        Grant Ingersoll
      2. SOLR-852.patch
        42 kB
        Grant Ingersoll

        Issue Links

          Activity

          Hide
          Grant Ingersoll added a comment -

          Here's a first crack at refactoring common code for ContentStream handling. All tests pass and I also tried out the example adding docs and uploading CSVs.

          Show
          Grant Ingersoll added a comment - Here's a first crack at refactoring common code for ContentStream handling. All tests pass and I also tried out the example adding docs and uploading CSVs.
          Hide
          Erik Hatcher added a comment -

          Patch looks good, Grant. The abstract class of ContentStreamLoader rather than an interface is the only thing that bugs me, but that's a personal issue The errorHeader thing seems like a hack, it could just be part of the load() method. But +1 to apply as-is.

          Show
          Erik Hatcher added a comment - Patch looks good, Grant. The abstract class of ContentStreamLoader rather than an interface is the only thing that bugs me, but that's a personal issue The errorHeader thing seems like a hack, it could just be part of the load() method. But +1 to apply as-is.
          Hide
          Grant Ingersoll added a comment -

          Remove the setErrorHeader stuff and just set it in the load.

          I will likely commit tomorrow.

          Show
          Grant Ingersoll added a comment - Remove the setErrorHeader stuff and just set it in the load. I will likely commit tomorrow.
          Hide
          Grant Ingersoll added a comment -

          Committed revision 713761.

          I committed a slight change to the load method such that it also passes in the response, in case other loaders want to write to the response.

          Show
          Grant Ingersoll added a comment - Committed revision 713761. I committed a slight change to the load method such that it also passes in the response, in case other loaders want to write to the response.
          Hide
          Erik Hatcher added a comment -

          The setErr(or)Header is in the code you committed, fyi.

          Show
          Erik Hatcher added a comment - The setErr(or)Header is in the code you committed, fyi.

            People

            • Assignee:
              Grant Ingersoll
              Reporter:
              Grant Ingersoll
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development