GetBaseByRangeWithExtraVal

API definition

APP_ERROR GetBaseByRangeWithExtraVal(uint32_t offset, uint32_t num, int64_t *labels, void *features, FeatureAttr *attributes, ExtraValAttr *extraVal) const;

Function

Queries the base vectors with additional attributes by range.

Input

uint32_t offset: initial offset of features.

uint32_t num: number of features.

Output

int64_t *labels: feature label.

void *features: features. The Hamming distance requires data of the uint8_t type, and Int8Flat requires data of the int8_t type.

FeatureAttr *attributes: feature attribute.

ExtraValAttr *extraVal: additional attribute.

Return value

APP_ERROR: return status. For details, see Return Code Reference.

Restrictions

  • 0<=offset<8.0e8
  • 0< num ≤8.0e8
  • offset+num ≤ ntotal
  • The length of labels must be num. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown.
  • The length of features must be num × dim (vector dimension). Otherwise, an out-of-bounds read/write error may occur, causing program breakdown.
  • The length of attributes must be num. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown.
  • The length of extraVal must be num. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown.