Search in sources :

Example 1 with UpdateResponse

use of org.apache.solr.client.solrj.response.schema.SchemaResponse.UpdateResponse in project lucene-solr by apache.

the class PreAnalyzedFieldManagedSchemaCloudTest method addField.

private void addField(Map<String, Object> field) throws Exception {
    CloudSolrClient client = cluster.getSolrClient();
    UpdateResponse addFieldResponse = new SchemaRequest.AddField(field).process(client, COLLECTION);
    assertNotNull(addFieldResponse);
    assertEquals(0, addFieldResponse.getStatus());
    assertNull(addFieldResponse.getResponse().get("errors"));
    FieldResponse fieldResponse = new SchemaRequest.Field(field.get("name").toString()).process(client, COLLECTION);
    assertNotNull(fieldResponse);
    assertEquals(0, fieldResponse.getStatus());
}
Also used : UpdateResponse(org.apache.solr.client.solrj.response.schema.SchemaResponse.UpdateResponse) SchemaRequest(org.apache.solr.client.solrj.request.schema.SchemaRequest) FieldResponse(org.apache.solr.client.solrj.response.schema.SchemaResponse.FieldResponse) CloudSolrClient(org.apache.solr.client.solrj.impl.CloudSolrClient)

Aggregations

CloudSolrClient (org.apache.solr.client.solrj.impl.CloudSolrClient)1 SchemaRequest (org.apache.solr.client.solrj.request.schema.SchemaRequest)1 FieldResponse (org.apache.solr.client.solrj.response.schema.SchemaResponse.FieldResponse)1 UpdateResponse (org.apache.solr.client.solrj.response.schema.SchemaResponse.UpdateResponse)1