parseHits

inline fun <T> SearchResponse.parseHits(json: Json = DEFAULT_JSON): List<T>

Quick way to get the document hits from a SearchResponse. You can override the default json if you need to.


fun <T> SearchResponse.parseHits(deserializationStrategy: DeserializationStrategy<T>, json: Json = DEFAULT_JSON): List<T>

Non reified version of parseHits that takes a deserializationStrategy.


fun <T : Any> SearchResponse.parseHits(deserializationStrategy: ModelSerializationStrategy<T>): List<T>

Version of parseHits that reuses the ModelSerializationStrategy.


inline fun <T> Flow<SearchResponse.Hit>.parseHits(): Flow<T>
fun <T> Flow<SearchResponse.Hit>.parseHits(deserializationStrategy: DeserializationStrategy<T>, json: Json = DEFAULT_JSON): Flow<T>
fun <T : Any> Flow<SearchResponse.Hit>.parseHits(deserializationStrategy: ModelSerializationStrategy<T>): Flow<T>