add
API definition |
void add(idx_t n, const float *x) override; |
|---|---|
Function |
Adds feature vectors to the database. |
Input |
idx_t n: number of feature vectors to be added. const float *x: feature vectors to be added. |
Output |
N/A |
Return value |
N/A |
Restrictions |
|
- add cannot be used together with add_with_ids.
- After add is used, the labels in the search result may be duplicate. If the service has requirements on labels, you are advised to use add_with_ids.
- The performance of add is optimized small-batch additions. However, the precision decreases depending on the dataset. It is advised to use small-batch addition primarily for existing databases.
Parent topic: AscendIndexIVFSP