These are chat archives for ReactiveX/RxJava
RxJava – Reactive Extensions for the JVM – a library for composing asynchronous and event-based programs using observable sequences for the Java VM.
Hey Gang. Question:
I’ve had something on here a bit ago regarding the conversion of Elasticsearch Futures to Observables. I’ve got all that working, but now I want to map search ‘hits’ to a particular domain object. It appears the Java ES API does not support codecs, so I thought I’d map over the observables. One hiccup, though, the observable is a wrapper that contains another data in addition to a list of Hits.
In this API, I’m converting a Future<SearchResponse> to Observable<SearchResponse>. SearchResponse has a variable, class SearchHits, which itself has a list (or array, more accurately) of type SearchHit.
So, from search response: searchResponse.getHits().hits() returns SearchHit.
How do I map a single searchResponse such that it emmits each individual SearchHit?