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

Deprecate and remove core URLs in HttpSolrClient and friends

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 9.5
    • SolrJ
    • None

    Description

      Currently, URL-driven SolrClients can consume a base URL that either ends in an API-version specific path ("/solr" for v1 APIs, "/api" for v2), or in the full path to a specific core or collection ("/solr/techproducts").

      The latter option causes a number of problems in practice. It prevents the client from being used for any "admin" requests or for requests to other cores or collections. (Short of running a regex on SolrClient.getBaseURL, it's hard to even tell which of these restrictions a given client might have.) And lastly, specifying such core/collection URL makes it tough mix and match v1 and v2 API requests within the same client (see SOLR-17044).

      We should give SolrJ users some similar way to default collection/cores without any of these downsides. One approach would be to extend the withDefaultCollection pattern currently established in CloudHttp2SolrClient.Builder.

      (IMO we should also revisit the division of responsibilities between SolrClient and SolrRequest implementations - maybe clients shouldn't, directly at least, be holding on to request-specific settings like the core/collection at all. But that's a much larger concern that we might not want to wade into here. See SOLR-10466 for more on this topic.)

      Attachments

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              gerlowskija Jason Gerlowski
              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 - 14h 10m
                  14h 10m