URL bulkIndexRequest = this.getClass().getResource("es-numericbulkindex.json");
byte[] data = ByteStreams.toByteArray(bulkIndexRequest.openStream());
bulkRequest.add(data, 0, data.length, true);
BulkResponse bulkResponse = client.bulk(bulkRequest).actionGet();
if (bulkResponse.hasFailures()) {
throw new RuntimeException("Failed to index data needed for test. " + bulkResponse.buildFailureMessage());
}
}
@Override
protected void tearDown() throws Exception {