Search
Searches for multiple indexes. Currently, only AscendIndexSQ is supported.
API Definition |
void Search(std::vector<Index *> indexes, Index::idx_t n, const float *x, Index::idx_t k,float *distances, Index::idx_t *labels, bool merged) |
|---|---|
Function |
Uses multiple indexes to perform retrieval. |
Input |
std::vector<Index *> indexes: multiple indexes to perform retrieval. Index::idx_t n: number of queries for retrieval. const float *x: feature vectors of queries for retrieval. Index::idx_t k: number of the most similar results to be returned. bool merged: whether to merge the retrieval results of multiple indexes. |
Output |
float *distances: distance between a vector and the first k nearest vectors. idx_t *labels: IDs of the first k nearest vectors that are queried. |
Return Value |
N/A |
Restrictions |
|