BatchUpdateBuilder

DSL for batchUpdate: accumulate point, vector and payload operations that Qdrant applies in the order they are added.

qdrant.batchUpdate("docs", wait = true) {
upsert { point(1) { vector(0.1f, 0.2f); payload("lang" to "en") } }
setPayload(payloadOf("reviewed" to true), byId(1))
delete(byFilter { must { "stale" eq true } })
}

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun byFilter(configure: FilterBuilder.() -> Unit): DeleteSelector

Select points by filter. An empty filter is rejected: on delete or clearPayload it would match every point in the collection.

Link copied to clipboard

Select points by id.

fun byId(vararg ids: PointId): DeleteSelector

Select points by id, e.g. setPayload(p, byId(1, 2)).

fun byId(vararg ids: Long): DeleteSelector

Select points by id, e.g. byId(1, 2) for numeric ids.

Link copied to clipboard

Clear all payload from the selected points.

Link copied to clipboard
fun delete(selector: DeleteSelector)

Delete the selected points.

Link copied to clipboard
fun deletePayload(keys: List<String>, selector: DeleteSelector)

Delete keys from the selected points' payload.

Link copied to clipboard
fun deleteVectors(vectors: List<String>, selector: DeleteSelector)

Delete the named vectors from the selected points.

Link copied to clipboard
fun overwritePayload(payload: Payload, selector: DeleteSelector)

Replace the selected points' payload with payload.

Link copied to clipboard
fun setPayload(payload: Payload, selector: DeleteSelector, key: String? = null)

Merge payload into the selected points' payload, optionally under the nested path key.

Link copied to clipboard

Update the vectors of existing points, keeping their payload.

Link copied to clipboard
fun upsert(configure: UpsertBuilder.() -> Unit)

Insert or replace points, using the same DSL as upsert.