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

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

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

        Activity

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

          People

            Unassigned Unassigned
            megancarey Megan Carey
            Votes:
            0 Vote for this issue
            Watchers:
            7 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

                Slack

                  Issue deployment