indexRequestBuilders[i] = client.prepareIndex("test", "test", id).setSource("field", "value" + i);
}
indexRandom(false, indexRequestBuilders);
String randomId = "id" + randomInt(numDocs-1);
GetResponse getResponse = client.prepareGet("test", "test", randomId).get();
assertThat(getResponse.isExists(), equalTo(true));
refresh();
SearchResponse searchResponse = client.prepareSearch("test").get();