Rate This Document
Findability
Accuracy
Completeness
Readability

SearchBatched

API Definition

Status ScannInterface::SearchBatched(const DenseDataset<float>& queries, MutableSpan<NNResultsVector> res, int final_nn, int pre_reorder_nn, int leaves) const;

Function

Batch query search (single-thread behavior consistent with the open source algorithm).

Parameters

Parameter

Data Type

Description

Value Range

queries

const DatapointPtr<float>&

Queries in a batch.

The value cannot be null.

res

MutableSpan<NNResultsVector>

Stores final results (labels and distances) with length final_nn for each entry representing the number of returned results.

The value cannot be null. The length is the number of query vectors.

final_nn

int

Number of returned results (Top K).

≥ 1. The value must match the build parameters.

pre_reorder_nn

int

Number of results saved before reordering.

final_nn, where final_nn indicates the number of results returned.

leaves

int

Number of subspaces to be searched.

[1, n_leaves], where n_leaves indicates the total number of subspaces in the IVF index partition.

Return Value

Data Type

Description

Status

Execution status of the method. You can determine whether the method is successfully executed by calling status.ok().