I am using the high level rest client and calling:
client.indexAsync(request, new ActionListener() {
public void onResponse(IndexResponse indexResponse) {
}
public void onFailure(Exception e) {
}
}
I want to convert the response to RxJava observable and give it back to the controller. But indexAsync does not have a return. Could someone please help me out?
Hi,
the response is returned via the ActionListener, the way to get it is to create your own ActionListener and pass it in to your indexAsync call. Why would you need a return value and what type would it be?
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.