-
public final class AsyncSearchResults<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description private final TotalHits
totalHits
private final Long
total
private final TotalHits.Relation
totalRelation
private final Flow<SearchHit>
searchHits
private final Flow<Pair<SearchHit, T>>
hits
private final Flow<T>
mappedHits
-
Constructor Summary
Constructors Constructor Description AsyncSearchResults(RestHighLevelClient client, ModelReaderAndWriter<T> modelReaderAndWriter, Long scrollTtlInMinutes, SearchResponse firstResponse, RequestOptions defaultRequestOptions)
-
Method Summary
Modifier and Type Method Description final Flow<SearchResponse>
rawResponses()
final TotalHits
getTotalHits()
final Long
getTotal()
final TotalHits.Relation
getTotalRelation()
final Flow<SearchHit>
getSearchHits()
final Flow<Pair<SearchHit, T>>
getHits()
A Flow of pairs of SearchHit
s and the deserializedT
as aFlow
.final Flow<T>
getMappedHits()
A Flow
ofT
.-
-
Constructor Detail
-
AsyncSearchResults
AsyncSearchResults(RestHighLevelClient client, ModelReaderAndWriter<T> modelReaderAndWriter, Long scrollTtlInMinutes, SearchResponse firstResponse, RequestOptions defaultRequestOptions)
-
-
Method Detail
-
rawResponses
final Flow<SearchResponse> rawResponses()
-
getTotalHits
final TotalHits getTotalHits()
-
getTotalRelation
final TotalHits.Relation getTotalRelation()
-
getSearchHits
final Flow<SearchHit> getSearchHits()
-
getHits
final Flow<Pair<SearchHit, T>> getHits()
A Flow of pairs of
SearchHit
s and the deserializedT
as aFlow
. Use this if you need both.
-
getMappedHits
final Flow<T> getMappedHits()
A
Flow
ofT
. Use this if you don't need the underlyingSearchHit
.
-
-
-
-