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

V2Requests: HttpSolrClient replaces first instance of "/solr" with "/api" instead of using regex pattern

    XMLWordPrintableJSON

    Details

      Description

      When the HttpSolrClient is formatting a V2Request, it needs to change the endpoint from the default "/solr/..." to "/api/...". It does so by simply calling String.replace, which replaces the first instance of "/solr" in the URL with "/api".

       

      In the case where the host's address starts with "solr" and the HTTP protocol is appended, this call changes the address for the request. Example:

      if baseUrl is "http://solr-host.com/8983/solr", this call will change to "http:/api-host.com:8983/solr"

       

      We should use a regex pattern to ensure that we're replacing the correct portion of the URL.

        Attachments

        1. SOLR-13727.patch
          27 kB
          Mikhail Khludnev

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                megancarey Megan Carey
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 20m
                  1h 20m