Class ConcurrentUpdateHttp2SolrClient.Builder

    • Field Detail

      • baseSolrUrl

        protected String baseSolrUrl
      • defaultCollection

        protected String defaultCollection
      • queueSize

        protected int queueSize
      • threadCount

        protected int threadCount
      • streamDeletes

        protected boolean streamDeletes
      • closeHttp2Client

        protected boolean closeHttp2Client
    • Constructor Detail

      • Builder

        public Builder​(String baseSolrUrl,
                       Http2SolrClient client)
        Create a Builder object, based on the provided SolrClient and Solr URL.

        Two different paths can be specified as a part of this URL:

        1) A path pointing directly at a particular core

           SolrClient client = new ConcurrentUpdateHttp2SolrClient.Builder(client, "http://my-solr-server:8983/solr/core1").build();
           QueryResponse resp = client.query(new SolrQuery("*:*"));
         
        Note that when a core is provided in the base URL, queries and other requests can be made without mentioning the core explicitly. However, the client can only send requests to that core. Attempts to make core-agnostic requests, or requests for other cores will fail.

        Use of these core-based URLs is deprecated and will not be supported in Solr 10.0 Users should instead provide base URLs as described below, and provide a "default collection" as desired using withDefaultCollection(String)

        2) The path of the root Solr path ("/solr")

           SolrClient client = new ConcurrentUpdateHttp2SolrClient.Builder("http://my-solr-server:8983/solr").build();
           QueryResponse resp = client.query("core1", new SolrQuery("*:*"));
         
        In this case the client is more flexible and can be used to send requests to any cores. Users can still provide a "default" collection if desired through use of withDefaultCollection(String).
      • Builder

        public Builder​(String baseSolrUrl,
                       Http2SolrClient client,
                       boolean closeHttp2Client)
        Create a Builder object, based on the provided SolrClient and Solr URL.

        Two different paths can be specified as a part of this URL:

        1) A path pointing directly at a particular core

           SolrClient client = new ConcurrentUpdateHttp2SolrClient.Builder(client, "http://my-solr-server:8983/solr/core1").build();
           QueryResponse resp = client.query(new SolrQuery("*:*"));
         
        Note that when a core is provided in the base URL, queries and other requests can be made without mentioning the core explicitly. However, the client can only send requests to that core. Attempts to make core-agnostic requests, or requests for other cores will fail.

        Use of these core-based URLs is deprecated and will not be supported in Solr 10.0 Users should instead provide base URLs as described below, and provide a "default collection" as desired using withDefaultCollection(String)

        2) The path of the root Solr path ("/solr")

           SolrClient client = new ConcurrentUpdateHttp2SolrClient.Builder("http://my-solr-server:8983/solr").build();
           QueryResponse resp = client.query("core1", new SolrQuery("*:*"));
         
        In this case the client is more flexible and can be used to send requests to any cores. Users can still provide a "default" collection if desired through use of withDefaultCollection(String).