org.apache.solr.client.solrj.impl

Class CloudSolrClient

    • Constructor Detail

      • CloudSolrClient

        @Deprecated
        public CloudSolrClient(String zkHost)
        Deprecated. use CloudSolrClient.Builder instead.
        Create a new client object that connects to Zookeeper and is always aware of the SolrCloud state. If there is a fully redundant Zookeeper quorum and SolrCloud has enough replicas for every shard in a collection, there is no single point of failure. Updates will be sent to shard leaders by default.
        Parameters:
        zkHost - The client endpoint of the zookeeper quorum containing the cloud state. The full specification for this string is one or more comma separated HOST:PORT values, followed by an optional chroot value that starts with a forward slash. Using a chroot allows multiple applications to coexist in one ensemble. For full details, see the Zookeeper documentation. Some examples:

        "host1:2181"

        "host1:2181,host2:2181,host3:2181/mysolrchroot"

        "zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181"

      • CloudSolrClient

        @Deprecated
        public CloudSolrClient(String zkHost,
                                           HttpClient httpClient)
        Deprecated. use CloudSolrClient.Builder instead.
        Create a new client object that connects to Zookeeper and is always aware of the SolrCloud state. If there is a fully redundant Zookeeper quorum and SolrCloud has enough replicas for every shard in a collection, there is no single point of failure. Updates will be sent to shard leaders by default.
        Parameters:
        zkHost - The client endpoint of the zookeeper quorum containing the cloud state. The full specification for this string is one or more comma separated HOST:PORT values, followed by an optional chroot value that starts with a forward slash. Using a chroot allows multiple applications to coexist in one ensemble. For full details, see the Zookeeper documentation. Some examples:

        "host1:2181"

        "host1:2181,host2:2181,host3:2181/mysolrchroot"

        "zoo1.example.com:2181,zoo2.example.com:2181,zoo3.example.com:2181"

        httpClient - the HttpClient instance to be used for all requests. The provided httpClient should use a multi-threaded connection manager.
      • CloudSolrClient

        @Deprecated
        public CloudSolrClient(Collection<String> zkHosts,
                                           String chroot)
        Deprecated. use CloudSolrClient.Builder instead.
        Create a new client object using multiple string values in a Collection instead of a standard zkHost connection string. Note that this method will not be used if there is only one String argument - that will use CloudSolrClient(String) instead.
        Parameters:
        zkHosts - A Java Collection (List, Set, etc) of HOST:PORT strings, one for each host in the zookeeper ensemble. Note that with certain Collection types like HashSet, the order of hosts in the final connect string may not be in the same order you added them.
        chroot - A chroot value for zookeeper, starting with a forward slash. If no chroot is required, use null.
        Throws:
        IllegalArgumentException - if the chroot value does not start with a forward slash.
        See Also:
        CloudSolrClient(String)
      • CloudSolrClient

        @Deprecated
        public CloudSolrClient(Collection<String> zkHosts,
                                           String chroot,
                                           HttpClient httpClient)
        Deprecated. use CloudSolrClient.Builder instead.
        Create a new client object using multiple string values in a Collection instead of a standard zkHost connection string. Note that this method will not be used if there is only one String argument - that will use CloudSolrClient(String) instead.
        Parameters:
        zkHosts - A Java Collection (List, Set, etc) of HOST:PORT strings, one for each host in the zookeeper ensemble. Note that with certain Collection types like HashSet, the order of hosts in the final connect string may not be in the same order you added them.
        chroot - A chroot value for zookeeper, starting with a forward slash. If no chroot is required, use null.
        httpClient - the HttpClient instance to be used for all requests. The provided httpClient should use a multi-threaded connection manager.
        Throws:
        IllegalArgumentException - if the chroot value does not start with a forward slash.
        See Also:
        CloudSolrClient(String)
      • CloudSolrClient

        @Deprecated
        public CloudSolrClient(Collection<String> zkHosts,
                                           String chroot,
                                           HttpClient httpClient,
                                           LBHttpSolrClient lbSolrClient,
                                           boolean updatesToLeaders)
        Deprecated. use CloudSolrClient.Builder instead. This will soon be a protected method, and will only be available for use in implementing subclasses.
        Create a new client object that connects to Zookeeper and is always aware of the SolrCloud state. If there is a fully redundant Zookeeper quorum and SolrCloud has enough replicas for every shard in a collection, there is no single point of failure. Updates will be sent to shard leaders by default.
        Parameters:
        zkHosts - A Java Collection (List, Set, etc) of HOST:PORT strings, one for each host in the zookeeper ensemble. Note that with certain Collection types like HashSet, the order of hosts in the final connect string may not be in the same order you added them.
        chroot - A chroot value for zookeeper, starting with a forward slash. If no chroot is required, use null.
        httpClient - the HttpClient instance to be used for all requests. The provided httpClient should use a multi-threaded connection manager. If null, a default HttpClient will be used.
        lbSolrClient - LBHttpSolrClient instance for requests. If null, a default LBHttpSolrClient will be used.
        updatesToLeaders - If true, sends updates to shard leaders.