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

CloudSolrClient.Builder should accept a zk host

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 7.3, 8.0
    • None
    • None

    Description

      Today we need to create an empty builder and then wither pass zkHost or withSolrUrl

      SolrClient solrClient = new CloudSolrClient.Builder().withZkHost("localhost:9983").build();
      solrClient.request(updateRequest, "gettingstarted");
      

      What if we have two constructors , one that accepts a zkHost and one that accepts a SolrUrl .

      The advantages that I can think of are:

      • It will be obvious to users that we support two mechanisms of creating a CloudSolrClient . The SolrUrl option is cool and applications don't need to know about ZooKeeper and new users will learn about this . Maybe our example's on the ref guide should use this?
      • Today people can set both zkHost and solrUrl but CloudSolrClient can only utilize one of them

      HttpClient's Builder accepts the host

      HttpSolrClient client = new HttpSolrClient.Builder("http://localhost:8983/solr").build();
      client.request(updateRequest, "techproducts");
      

      Attachments

        1. SOLR-11629.patch
          55 kB
          Jason Gerlowski
        2. SOLR-11629.patch
          58 kB
          Jason Gerlowski
        3. SOLR-11629.patch
          58 kB
          Varun Thacker
        4. SOLR-11629.patch
          63 kB
          Jason Gerlowski
        5. SOLR-11629.patch
          50 kB
          Jason Gerlowski

        Issue Links

          Activity

            People

              gerlowskija Jason Gerlowski
              varun Varun Thacker
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: