Adds documents to the index.
add_to_index(
self,
ids: list[str],
embeddings: list[list[float]],
metadatas: list[dict] | None = None,
is_complete_overwrite: bool = False,
*,
sparse_embeddings: list[dict[str, list[int] | list[float]]] | None = None,
**kwargs: Any = {}
) -> None| Name | Type | Description |
|---|---|---|
ids* | list[str] | List of unique ids. |
embeddings* | list[list[float]] | List of embeddings for each record. |
metadatas | list[dict] | None | Default: NoneList of metadata of each record. |
is_complete_overwrite | bool | Default: FalseWhether to overwrite the entire index. |
sparse_embeddings | list[dict[str, list[int] | list[float]]] | None | Default: NoneList of sparse embeddings for each record. |