Search in sources :

Example 1 with SchemaResponse

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

the class SchemaTest method testSchemaRequestAccuracy.

@Test
public void testSchemaRequestAccuracy() throws Exception {
    SchemaRequest schemaRequest = new SchemaRequest();
    SchemaResponse schemaResponse = schemaRequest.process(getSolrClient());
    assertValidSchemaResponse(schemaResponse);
    SchemaRepresentation schemaRepresentation = schemaResponse.getSchemaRepresentation();
    assertNotNull(schemaRepresentation);
    assertEquals("test", schemaRepresentation.getName());
    assertEquals(1.6, schemaRepresentation.getVersion(), 0.001f);
    assertEquals("id", schemaRepresentation.getUniqueKey());
    assertFalse(schemaRepresentation.getFields().isEmpty());
    assertFalse(schemaRepresentation.getDynamicFields().isEmpty());
    assertFalse(schemaRepresentation.getFieldTypes().isEmpty());
    assertFalse(schemaRepresentation.getCopyFields().isEmpty());
}
Also used : SchemaRequest(org.apache.solr.client.solrj.request.schema.SchemaRequest) SchemaRepresentation(org.apache.solr.client.solrj.response.schema.SchemaRepresentation) SchemaResponse(org.apache.solr.client.solrj.response.schema.SchemaResponse) Test(org.junit.Test)

Aggregations

SchemaRequest (org.apache.solr.client.solrj.request.schema.SchemaRequest)1 SchemaRepresentation (org.apache.solr.client.solrj.response.schema.SchemaRepresentation)1 SchemaResponse (org.apache.solr.client.solrj.response.schema.SchemaResponse)1 Test (org.junit.Test)1