AddFeature
API definition |
APP_ERROR AddFeature(int64_t count, const void *features, const FeatureAttr *attributes, const int64_t *labels, const uint8_t *customAttr = nullptr); |
|---|---|
Function |
Adds features. |
Input |
int64_t count: number of features to be added. const void *features: feature to be added. The Hamming distance requires data of the uint8_t type, Int8Flat requires data of the int8_t type, and FP16Flat requires data of the float type. const FeatureAttr *attributes: feature attribute to be added. For details, see FeatureAttr. const int64_t *labels: feature label to be added. Ensure that the label is unique in the index instance. const uint8_t *customAttr: custom d feature attribute to be added. |
Output |
N/A |
Return value |
APP_ERROR: return status. For details, see Return Code Reference. |
Restrictions |
|
AddFeature and AddWithExtraVal cannot be used together.