Add
API definition |
APP_ERROR Add(const std::vector<float>& baseData); |
|---|---|
Function |
Creates an AscendIndexVStar database and adds new feature vectors into the database. |
Input |
const std::vector<float>& baseData: feature vectors to be added. |
Output |
N/A |
Return value |
APP_ERROR: return status. For details, see Return Code Reference. |
Restrictions |
The length of baseData must be n × dim, where n (n ∈ [10000, 1e8]) indicates the number of vectors to be added, and dim indicates vector dimension. This API does not set the ID. The default ID range of the database is [ntotal, ntotal + n). ntotal indicates the number of existing base libraries of the index, and n indicates the number of vectors to be added. |
- This API cannot be used together with AddWithIds.
- 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 AddWithIds.
Parent topic: AscendIndexVStar