searchAs

inline suspend fun <T> QdrantClient.searchAs(name: String, json: Json = kdrantJson, noinline configure: SearchBuilder.() -> Unit): List<Hit<T>>

Like QdrantClient.search, but decodes each hit's payload into T — the typical RAG read path.

val hits: List<Hit<Article>> = qdrant.searchAs<Article>("articles") {
query(queryVector)
limit = 5
}

Parameters

json

the Json used to decode payloads (defaults to kdrantJson).