Add documents to the vectorstore.
add_documents(
self,
documents: List[Document],
ids: Optional[List[str]] = None,
batch_size: int = DEFAULT_INSERT_BATCH_SIZE,
**kwargs: Any = {}
) -> List[str]| Name | Type | Description |
|---|---|---|
documents* | List[Document] | Documents to add to the vectorstore. |
ids | Optional[List[str]] | Default: NoneOptional list of unique ids that will be used as index in VectorStore. See note on ids in add_texts. |
batch_size | int | Default: DEFAULT_INSERT_BATCH_SIZENumber of documents to insert at a time. Tuning this may help with performance and sidestep MongoDB limits. |