PrefetchBuilder

DSL for a Prefetch sub-request. Like SearchBuilder but without response-shaping options (offset, with_payload, with_vector), which apply only to the outer request.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
var limit: Int?

Maximum number of candidates this prefetch contributes.

Link copied to clipboard

Drop candidates scoring below this threshold.

Link copied to clipboard

Name of the vector to search when the collection has named vectors.

Functions

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

Restrict this prefetch to points matching the filter.

Link copied to clipboard
fun lookupFrom(collection: String, vector: String? = null)

Look up query-by-id vectors from another collection.

Link copied to clipboard
fun params(configure: SearchParamsBuilder.() -> Unit)

Tune the accuracy/speed trade-off.

Link copied to clipboard
fun prefetch(configure: PrefetchBuilder.() -> Unit)

Add a nested prefetch sub-request.

Link copied to clipboard
fun query(id: PointId)

Search by the stored vector of an existing point.

fun query(query: QueryInterface)

Set the query directly (e.g. a prebuilt QueryInterface).

fun query(values: List<Float>)
fun query(vararg values: Float)

Search by an explicit dense query vector.

Link copied to clipboard
fun queryMulti(vectors: List<List<Float>>)

Search by a multi-vector / late-interaction (ColBERT) query.

Link copied to clipboard
fun querySparse(indices: List<Int>, values: List<Float>)

Search by a sparse query vector (set using to the sparse vector's name).