update

Function

Updates the data in a vector database.

Prototype

@abstractmethod
def update(ids: List[int], dense: Optional[np.ndarray] = None,
           sparse: Optional[List[Dict[int, float]]] = None):

Parameters

Parameter

Data Type

Required/Optional

Description

ids

List[int]

Required

ID list to be updated. The ID list and vector list must correspond to each other. The length range of ids is [0, 10 million).

dense

Optional[np.ndarray]

Optional

Dense vector returned by calling embed_documents. dense and sparse cannot be both None.

sparse

Optional[List[Dict[int, float]]]

Optional

Sparse vector returned by calling embed_documents. dense and sparse cannot be both None.

Return Value

None