use of org.apache.jena.query.text.es.TextIndexES in project jena by apache.
the class BaseESTest method setupTransportClient.
/**
* Make sure that we have connectivity to the locally running ES node.
* The ES is started during the pre-integration-test phase
*/
@BeforeClass
public static void setupTransportClient() {
Settings settings = Settings.builder().put("cluster.name", CLUSTER_NAME).build();
transportClient = new PreBuiltTransportClient(settings);
try {
transportClient.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(ADDRESS), PORT));
} catch (UnknownHostException ex) {
Assert.fail("Failed to create transport client" + ex.getMessage());
}
classToTest = new TextIndexES(config(), transportClient, INDEX_NAME);
Assert.assertNotNull("Transport client was not created successfully", transportClient);
}
Aggregations