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

Make SolrClient classes extendable without code duplication

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


    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 7.0
    • Component/s: clients - java
    • Labels:


      SolrClient used to be easily extendable but our move to Builder pattern has made it impossible to extend those classes without code duplication.
      As an example, if we wanted to extend HttpSolrClient we would also want to extend the Builder. The problem is that the constructor of the main class, does not accept the builder object but explicit parameters, and the inherited class doesn't have access to any of those values from the Builder object as they are all private.

      Generally, we'd want to have the client object constructor accept the Builder, instead of explicit values, and also make the Builder values protected so the inherited classes could use them.

      I'm marking this as a blocker for 7.0 as this is an important piece that needs to be fixed before the major release, specially now that we know that this problem exists.


        1. SOLR-10915.patch.without-deprecations
          11 kB
          Jason Gerlowski
        2. SOLR-10915.patch.with-deprecations
          32 kB
          Jason Gerlowski
        3. SOLR-10915.patch
          40 kB
          Jason Gerlowski
        4. SOLR-10915.patch
          37 kB
          Anshum Gupta

        Issue Links



            • Assignee:
              anshum Anshum Gupta
              anshum Anshum Gupta


              • Created:

                Issue deployment