Search in sources :

Example 71 with CollectionAdminResponse

use of org.apache.solr.client.solrj.response.CollectionAdminResponse in project beijingThirdPeriod by weidongcao.

the class SolrAliasTest method createAlias.

public static void createAlias() throws IOException, SolrServerException {
    String collections = "yisou20171200,yisou20171201,yisou20171202";
    // instertData();
    CollectionAdminRequest.CreateAlias alias = CollectionAdminRequest.createAlias("yisou", collections);
    CollectionAdminResponse response = alias.process(client);
    System.out.println("response = " + response);
}
Also used : CollectionAdminResponse(org.apache.solr.client.solrj.response.CollectionAdminResponse) CollectionAdminRequest(org.apache.solr.client.solrj.request.CollectionAdminRequest)

Aggregations

CollectionAdminResponse (org.apache.solr.client.solrj.response.CollectionAdminResponse)71 CollectionAdminRequest (org.apache.solr.client.solrj.request.CollectionAdminRequest)40 Test (org.junit.Test)21 SolrServerException (org.apache.solr.client.solrj.SolrServerException)13 NamedList (org.apache.solr.common.util.NamedList)13 SolrClient (org.apache.solr.client.solrj.SolrClient)9 CloudSolrClient (org.apache.solr.client.solrj.impl.CloudSolrClient)9 HttpSolrClient (org.apache.solr.client.solrj.impl.HttpSolrClient)9 ArrayList (java.util.ArrayList)8 ModifiableSolrParams (org.apache.solr.common.params.ModifiableSolrParams)8 IOException (java.io.IOException)7 Replica (org.apache.solr.common.cloud.Replica)7 QueryRequest (org.apache.solr.client.solrj.request.QueryRequest)6 Map (java.util.Map)5 SolrRequest (org.apache.solr.client.solrj.SolrRequest)5 ZkStateReader (org.apache.solr.common.cloud.ZkStateReader)5 HttpResponse (org.apache.http.HttpResponse)4 HttpGet (org.apache.http.client.methods.HttpGet)4 HttpPost (org.apache.http.client.methods.HttpPost)4 StringEntity (org.apache.http.entity.StringEntity)4