add

Function

Adds vectors to a vector database.

Prototype

def add(ids, embeddings, document_id)

Parameters

Parameter

Data Type

Required/Optional

Description

ids

List[int]

Required

ID list of vectors. The length range of ids is [0, 10 million).

embeddings

np.ndarray

Required

Document vector to be added.

document_id

Integer

Optional

Inherited from the base class. This parameter is not supported by MindFAISS.

The shape of embeddings must be 2D. The number of vectors contained in embeddings must be equal to the length of ids. The total number of added vectors must be less than 10 million.