Add a list of texts to the Elasticsearch index.
add_texts(
self,
texts: Iterable[str],
metadatas: Optional[List[Dict[Any, Any]]] = None,
model_id: Optional[str] = None,
refresh_indices: bool = False,
**kwargs: Any = {}
) -> List[str]| Name | Type | Description |
|---|---|---|
texts* | Iterable[str] | The texts to add to the index. |
metadatas | List[Dict[Any, Any]] | Default: NoneA list of metadata dictionaries to associate with the texts. |
model_id | str | Default: NoneThe ID of the model to use for transforming the texts into vectors. |
refresh_indices | bool | Default: FalseWhether to refresh the Elasticsearch indices after adding the texts. |
**kwargs | Any | Default: {}Arbitrary keyword arguments. |