add_with_ids

API Definition

void add_with_ids(Index::idx_t n, const char *x, const Index::idx_t *ids)

Function

Adds new feature vectors to the AscendIndexInt8 base library and specifies feature IDs.

Input

Index::idx_t n: number of feature vectors to be added to the base library.

const char *x: feature vectors to be added to the base library.

const Index::idx_t *ids: IDs of the feature vectors to be added to the base library.

Output

N/A

Return Value

N/A

Restrictions

  • The length of the x must be dim x n, and the length of the ids must be n. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown.
  • The total number of vectors in the base library cannot exceed 1e9.