if(client != null) {
client.close();
}
}
public void put(String index, String type, String id, BytesStream source) {
<BUG>client.prepareIndex(index, type, id).setSource(source.bytes()).execute();
</BUG>
}
public void put(String index, String type, String id, BytesStream source, String parent) {
<BUG>client.prepareIndex(index, type, id).setParent(parent).setSource(source.bytes()).execute();
</BUG>
}

if(client != null) {
client.close();
}
}
public void put(String index, String type, String id, BytesStream source) {
client.prepareIndex(index, type, id).setSource(source.bytes()).execute().actionGet();
}
public void put(String index, String type, String id, BytesStream source, String parent) {
client.prepareIndex(index, type, id).setParent(parent).setSource(source.bytes()).execute().actionGet();
}
