RemoveFeatures

API definition

APP_ERROR RemoveFeatures(int n, const idx_t *indices) override;

Function

Deletes n feature vectors with specified indexes from the vector database.

Input

int n: number of feature vectors to be deleted.

const idx_t *indices: index corresponding to a feature vector. The length is n.

Output

N/A

Return value

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

Restrictions

  • indices: The index range of each feature is [0, ntotal). ntotal can be obtained through the GetNTotal API.
  • n: The value range is [0, capacity].
  • indices must be a non-null pointer and its length must meet the requirements. Otherwise, an out-of-bounds read/write error may occur, causing program breakdown.