Insert text data into Milvus.
Inserting data when the collection has not be made yet will result in creating a new Collection. The data of the first entity decides the schema of the new collection, the dim is extracted from the first embedding and the columns are decided by the first metadata dict. Metadata keys will need to be present for all inserted values. At the moment there is no None equivalent in Milvus.
add_texts(
self,
texts: Iterable[str],
metadatas: Optional[List[dict]] = None,
timeout: Optional[float] = None,
batch_size: int = 1000,
*,
ids: Optional[List[str]] = None,
**kwargs: Any = {}
) -> List[str]| Name | Type | Description |
|---|---|---|
texts* | Iterable[str] | The texts to embed, it is assumed that they all fit in memory. |
metadatas | Optional[List[dict]] | Default: NoneMetadata dicts attached to each of the texts. Defaults to None. |
timeout | Optional[float] | Default: NoneTimeout for each batch insert. Defaults to None. |
batch_size | int | Default: 1000Batch size to use for insertion. Defaults to 1000. |
ids | Optional[List[str]] | Default: NoneList of text ids. The length of each item |