Search in sources :

Example 6 with Builder

use of org.apache.solr.client.solrj.impl.CloudSolrClient.Builder in project lucene-solr by apache.

the class CloudSolrClientBuilderTest method testSingleZkHostSpecified.

@Test
public void testSingleZkHostSpecified() throws IOException {
    try (CloudSolrClient createdClient = new Builder().withZkHost(ANY_ZK_HOST).withZkChroot(ANY_CHROOT).build()) {
        final String clientZkHost = createdClient.getZkHost();
        assertTrue(clientZkHost.contains(ANY_ZK_HOST));
    }
}
Also used : Builder(org.apache.solr.client.solrj.impl.CloudSolrClient.Builder) Test(org.junit.Test)

Aggregations

Builder (org.apache.solr.client.solrj.impl.CloudSolrClient.Builder)6 IOException (java.io.IOException)2 ArrayList (java.util.ArrayList)2 QueryRequest (org.apache.solr.client.solrj.request.QueryRequest)2 ModifiableSolrParams (org.apache.solr.common.params.ModifiableSolrParams)2 NamedList (org.apache.solr.common.util.NamedList)2 Test (org.junit.Test)2 HashMap (java.util.HashMap)1 TreeSet (java.util.TreeSet)1 FieldComparator (org.apache.solr.client.solrj.io.comp.FieldComparator)1 MultipleFieldComparator (org.apache.solr.client.solrj.io.comp.MultipleFieldComparator)1