MultiSearch
API definition |
APP_ERROR MultiSearch(std::vector<AscendIndexVStar*>& indexes, const AscendIndexSearchParams& params, bool merge) const; |
|---|---|
Function |
Queries the feature vectors for multiple AscendIndexVStar libraries and returns the distance and IDs of the most similar topK features based on the input feature vectors. |
Input |
std::vector<AscendIndexVStar*>& indexes: multiple indexes to perform retrieval. const AscendIndexSearchParams& params: search parameter. For details, see AscendIndexSearchParams. size_t n: number of feature vectors to be queried. std::vector<float>& queryData: feature vector data. int topK: number of the most similar results to be returned. bool merge: whether to merge the retrieval results of multiple indexes. |
Output |
std::vector<float>& dists: distance between a vector and the topK nearest vectors. std::vector<int64_t>& labels: IDs of the topK nearest vectors that are queried. |
Return value |
APP_ERROR: return status. For details, see Return Code Reference. |
Restrictions |
|