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

Structural changes in SolrJ since version 7.0.0 have effectively disabled multipart post

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments


    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 7.4
    • None
    • SolrJ
    • None


      Project ManifoldCF uses SolrJ to post documents to Solr. When upgrading from SolrJ 7.0.x to SolrJ 7.4, we encountered significant structural changes to SolrJ's HttpSolrClient class that seemingly disable any use of multipart post. This is critical because ManifoldCF's documents often contain metadata in excess of 4K that therefore cannot be stuffed into a URL.

      The changes in question seem to have been performed by Paul Noble on 10/31/2017, with the introduction of the RequestWriter mechanism. Basically, if a request has a RequestWriter, it is used exclusively to write the request, and that overrides the stream mechanism completely. I haven't chased it back to a specific ticket.

      ManifoldCF's usage of SolrJ involves the creation of ContentStreamUpdateRequests for all posts meant for Solr Cell, and the creation of UpdateRequests for posts not meant for Solr Cell (as well as for delete and commit requests). For our release cycle that is taking place right now, we're shipping a modified version of HttpSolrClient that ignores the RequestWriter when dealing with ContentStreamUpdateRequests. We apparently cannot use multipart for all requests because on the Solr side we get "pfountz Should not get here!" errors on the Solr side when we do, which generate HTTP error code 500 responses. That should not happen either, in my opinion.


        1. HOT Balloon Trip_Ultra HD.jpg
          1.18 MB
          Julien Massiera
        2. no params in url.png
          80 kB
          Mikhail Khludnev
        3. SOLR-12798.patch
          13 kB
          Noble Paul
        4. SOLR-12798.patch
          8 kB
          Noble Paul
        5. SOLR-12798.patch
          6 kB
          Mikhail Khludnev
        6. SOLR-12798-approach.patch
          6 kB
          Karl Wright
        7. SOLR-12798-reproducer.patch
          2 kB
          Mikhail Khludnev
        8. SOLR-12798-workaround.patch
          3 kB
          Mikhail Khludnev
        9. solr-update-request.txt
          36 kB
          Julien Massiera

        Issue Links


          This comment will be Viewable by All Users Viewable by All Users


            noble.paul Noble Paul
            kwright@metacarta.com Karl Wright
            1 Vote for this issue
            12 Start watching this issue




                Issue deployment