@Test(expected = IOException.class) public void buildThrowsException_forElasticsearch5() throws Exception { mockServerClient.when(HttpRequest.request().withPath("/")) .respond(HttpResponse.response().withBody("{" + " \"name\" : \"WrNJ2o6\"," + " \"cluster_name\" : \"elasticsearch\"," + " \"cluster_uuid\" : \"QqNMqGgzRsmZDyjZAfel5g\"," + " \"version\" : {" + " \"number\" : \"5.6.9\"," + " \"build_hash\" : \"877a590\"," + " \"build_date\" : \"2018-04-12T16:25:14.838Z\"," + " \"build_snapshot\" : false," + " \"lucene_version\" : \"6.6.1\"" + " }," + " \"tagline\" : \"You Know, for Search\"" + "}", MediaType.JSON_UTF_8)); factory.buildConnector(); }
public ElasticsearchConnector buildConnector() throws IOException { final ElasticsearchConnector connector; if (versionAllowsTypes(getVersionDetails())) { connector = new MappingTypeElasticsearchConnector(client); } else { connector = new IndexOnlyElasticsearchConnector(client); } return connector; }
ElasticsearchConnectorFactory { public ElasticsearchConnector buildConnector() throws IOException { final ElasticsearchConnector connector; if (versionAllowsTypes(getVersionDetails())) { connector = new MappingTypeElasticsearchConnector(client); } else { connector = new IndexOnlyElasticsearchConnector(client); } return connector; } }
ElasticsearchConnectorFactory { public ElasticsearchConnector buildConnector() throws IOException { final ElasticsearchConnector connector; if (versionAllowsTypes(getVersionDetails())) { connector = new MappingTypeElasticsearchConnector(client); } else { connector = new IndexOnlyElasticsearchConnector(client); } return connector; } ElasticsearchConnectorFactory(RestHighLevelClient client); }
ElasticsearchConnectorFactory { public ElasticsearchConnector buildConnector() throws IOException { final ElasticsearchConnector connector; if (versionAllowsTypes(getVersionDetails())) { connector = new MappingTypeElasticsearchConnector(client); } else { connector = new IndexOnlyElasticsearchConnector(client); } return connector; } ElasticsearchConnectorFactory(RestHighLevelClient client); ElasticsearchConnector buildConnector(); }
ElasticsearchConnectorFactory { public ElasticsearchConnector buildConnector() throws IOException { final ElasticsearchConnector connector; if (versionAllowsTypes(getVersionDetails())) { connector = new MappingTypeElasticsearchConnector(client); } else { connector = new IndexOnlyElasticsearchConnector(client); } return connector; } ElasticsearchConnectorFactory(RestHighLevelClient client); ElasticsearchConnector buildConnector();  }