下载
中文
注册

add_with_ids

API定义

void add_with_ids(idx_t n, const int8_t *x, const idx_t *ids);

功能描述

向AscendIndexInt8底库中添加新的特征向量,且指定特征ID。

输入

idx_t n:添加进底库的特征向量数量。

const int8_t *x:添加进底库的特征向量。

const idx_t *ids:添加进底库的特征向量ID。ID在Index实例中需唯一。

输出

返回值

约束说明

  • 此处指针“x”的长度应该为dims * n,指针ids的长度应该为“n”,否则可能出现越界读写的错误并引起程序崩溃。
  • 底库向量总数的取值范围:0 < n < 1e9。