count
abstract suspend fun count(name: String, exact: Boolean = true, routeAffinity: String? = null): Long
Count the points in a collection.
Parameters
exact
an exact count (default) vs a faster approximate one.
routeAffinity
a stable token pinning this read to one replica; see dev.kdrant.dsl.SearchBuilder.routeAffinity.
Throws
if the collection does not exist.
if the API key is missing or wrong.
if the request exceeds the configured timeout.
on a connection failure or server error.
abstract suspend fun count(name: String, exact: Boolean = true, routeAffinity: String? = null, filter: FilterBuilder.() -> Unit): Long
Count the points in a collection that match a filter.
val n = qdrant.count("docs") { must { "lang" eq "en" } }Content copied to clipboard
Parameters
routeAffinity
a stable token pinning this read to one replica; see dev.kdrant.dsl.SearchBuilder.routeAffinity.
Throws
if the collection does not exist.