search_with_filter
API Definition |
void search_with_filter(Index::idx_t n, const float *x, Index::idx_t k, float *distances, Index::idx_t *labels, const void *filters) const |
|---|---|
Function |
Queries the AscendIndexSQ feature vectors and returns IDs of the most similar k features based on the input feature vectors. The CID-based filtering function is provided. filters is a uint32_t array of 6 characters. The first four digits (128 bits) indicate the CID, and the last two digits indicate the left-closed range of the corresponding timestamp, that is, [x,y). |
Input |
idx_t n: number of feature vectors to be queried. const float *x: feature vector data. idx_t k: number of the most similar results to be returned. const void *filters: filter criteria. |
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 |
|