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

Implicit configuration of Update handlers does not match previous explicit one

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Won't Fix
    • 5.0
    • 5.0, 6.0
    • update
    • None

    Description

      There seem to be confusion/inconsistency between contentType (stream or update) parameter as defined in the commented-out update handler and new implicit implementation.

      Specifically, in (current 5 build's) techproduct's solrconfig.xml, it says:

      <!-- The following are implicitly added
      <requestHandler name="/update/json" class="solr.UpdateRequestHandler">
      <lst name="defaults">
      <str name="stream.contentType">application/json</str>
      </lst>
      </requestHandler>
      <requestHandler name="/update/csv" class="solr.UpdateRequestHandler">
      <lst name="defaults">
      <str name="stream.contentType">application/csv</str>
      </lst>
      </requestHandler>
      -->

      The documentation also says to use stream.contentType at: https://cwiki.apache.org/confluence/display/solr/Uploading+Data+with+Index+Handlers

      However, the http://localhost:8983/solr/techproducts/config says instead:

      "/update/json":{
      "name":"/update/json",
      "class":"org.apache.solr.handler.UpdateRequestHandler",
      "defaults":{"update.contentType":"application/json"}},
      "/update/csv":{
      "name":"/update/csv",
      "class":"org.apache.solr.handler.UpdateRequestHandler",
      "defaults":{"update.contentType":"application/csv"}},

      Seems to be pure inconsistency, since Reference Guide does not mention update.contentType.

      Yet earlier in the same solrconfig.xml it says:

      To override the request content type and force a specific
      Content-type, use the request parameter:
      ?update.contentType=text/csv

      Are these different or same? They should definitely be consistent between code and comment, but it seems there is a bit of an extra confusion on top.

      Attachments

        1. SOLR-6938.patch
          2 kB
          Noble Paul

        Activity

          People

            noble.paul Noble Paul
            arafalov Alexandre Rafalovitch
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: