Search in sources :

Example 41 with HttpSolrClient

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

the class TestDynamicLoading method setupHarnesses.

private void setupHarnesses() {
    for (final SolrClient client : clients) {
        RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
        restTestHarnesses.add(harness);
    }
}
Also used : RestTestHarness(org.apache.solr.util.RestTestHarness) SolrClient(org.apache.solr.client.solrj.SolrClient) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient)

Example 42 with HttpSolrClient

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

the class TestCloudManagedSchemaConcurrent method setupHarnesses.

private void setupHarnesses() {
    for (final SolrClient client : clients) {
        RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
        restTestHarnesses.add(harness);
    }
}
Also used : RestTestHarness(org.apache.solr.util.RestTestHarness) SolrClient(org.apache.solr.client.solrj.SolrClient) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient)

Example 43 with HttpSolrClient

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

the class TestBulkSchemaConcurrent method setupHarnesses.

private void setupHarnesses() {
    for (final SolrClient client : clients) {
        RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
        restTestHarnesses.add(harness);
    }
}
Also used : RestTestHarness(org.apache.solr.util.RestTestHarness) SolrClient(org.apache.solr.client.solrj.SolrClient) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient)

Example 44 with HttpSolrClient

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

the class TestSmileRequest method testDistribJsonRequest.

@Test
public void testDistribJsonRequest() throws Exception {
    initServers();
    SolrTestCaseHS.Client client = servers.getClient(random().nextInt());
    client.tester = new SolrTestCaseHS.Client.Tester() {

        @Override
        public void assertJQ(SolrClient client, SolrParams args, String... tests) throws Exception {
            ((HttpSolrClient) client).setParser(SmileResponseParser.inst);
            QueryRequest query = new QueryRequest(args);
            String path = args.get("qt");
            if (path != null) {
                query.setPath(path);
            }
            NamedList<Object> rsp = client.request(query);
            Map m = rsp.asMap(5);
            String jsonStr = Utils.toJSONString(m);
            SolrTestCaseHS.matchJSON(jsonStr, tests);
        }
    };
    client.queryDefaults().set("shards", servers.getShards());
    TestJsonRequest.doJsonRequest(client);
}
Also used : QueryRequest(org.apache.solr.client.solrj.request.QueryRequest) SolrClient(org.apache.solr.client.solrj.SolrClient) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient) NamedList(org.apache.solr.common.util.NamedList) SolrParams(org.apache.solr.common.params.SolrParams) SolrTestCaseHS(org.apache.solr.SolrTestCaseHS) SolrClient(org.apache.solr.client.solrj.SolrClient) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient) Map(java.util.Map) IOException(java.io.IOException) Test(org.junit.Test) SmileWriterTest(org.apache.solr.response.SmileWriterTest)

Example 45 with HttpSolrClient

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

the class TestNamedUpdateProcessors method setupHarnesses.

private void setupHarnesses() {
    for (final SolrClient client : clients) {
        RestTestHarness harness = new RestTestHarness(() -> ((HttpSolrClient) client).getBaseURL());
        restTestHarnesses.add(harness);
    }
}
Also used : RestTestHarness(org.apache.solr.util.RestTestHarness) SolrClient(org.apache.solr.client.solrj.SolrClient) HttpSolrClient(org.apache.solr.client.solrj.impl.HttpSolrClient)

Aggregations

HttpSolrClient (org.apache.solr.client.solrj.impl.HttpSolrClient)187 ModifiableSolrParams (org.apache.solr.common.params.ModifiableSolrParams)48 SolrClient (org.apache.solr.client.solrj.SolrClient)46 Test (org.junit.Test)46 SolrQuery (org.apache.solr.client.solrj.SolrQuery)38 ArrayList (java.util.ArrayList)35 Replica (org.apache.solr.common.cloud.Replica)34 SolrInputDocument (org.apache.solr.common.SolrInputDocument)31 IOException (java.io.IOException)26 QueryResponse (org.apache.solr.client.solrj.response.QueryResponse)25 Slice (org.apache.solr.common.cloud.Slice)25 QueryRequest (org.apache.solr.client.solrj.request.QueryRequest)24 SolrException (org.apache.solr.common.SolrException)23 SolrServerException (org.apache.solr.client.solrj.SolrServerException)21 JettySolrRunner (org.apache.solr.client.solrj.embedded.JettySolrRunner)20 NamedList (org.apache.solr.common.util.NamedList)19 CloudSolrClient (org.apache.solr.client.solrj.impl.CloudSolrClient)18 DocCollection (org.apache.solr.common.cloud.DocCollection)18 UpdateRequest (org.apache.solr.client.solrj.request.UpdateRequest)15 ZkCoreNodeProps (org.apache.solr.common.cloud.ZkCoreNodeProps)15