upsert

abstract suspend fun upsert(name: String, wait: Boolean = false, configure: UpsertBuilder.() -> Unit)

Upsert points into a collection.

qdrant.upsert("docs", wait = true) {
point(id = 1) {
vector(0.05f, 0.61f, 0.76f)
payload("title" to "Intro", "lang" to "it")
}
}

The transport may split a large batch into several sequential requests, which is not atomic: if a later request fails, earlier points are already applied. Upsert is idempotent per point id, so retrying the whole call is safe.

Parameters

name

the collection name.

wait

if true, return only once the change is applied; if false (default) it is queued.

configure

builds the points to upsert.

Throws

if the collection does not exist.

if a point is malformed (e.g. wrong vector size).

if the API key is missing or wrong.

if a request exceeds the configured timeout.

on a connection failure or server error.


abstract suspend fun upsert(name: String, points: Flow<PointStruct>, wait: Boolean = false)

Upsert points streamed from a Flow — ingest a large or unbounded source without materializing it all in memory. The engine chunks the flow to stay under the request-size cap; as with the DSL upsert, the chunks are applied sequentially and are not atomic across chunk boundaries.

qdrant.upsert("docs", embeddings.map { (id, v) -> PointStruct(PointId.num(id), VectorData.Dense(v)) })

abstract suspend fun upsert(name: String, points: Sequence<PointStruct>, wait: Boolean = false)

Upsert points from a lazy Sequence, chunked by the engine (see the Flow overload).