GetResponse getResponse = client.prepareGet("test", "test", randomId).get();
assertThat(getResponse.isExists(), equalTo(true));
refresh();
SearchResponse searchResponse = client.prepareSearch("test").get();
assertThat(searchResponse.getHits().totalHits(), equalTo((long)numDocs));
int randomDocId = randomInt(numDocs-1);
String fieldValue = "value" + randomDocId;
String id = "id" + randomDocId;