Create a new ElasticKnnSearch instance and add a list of texts to the Elasticsearch index.
from_texts(
cls,
texts: List[str],
embedding: Embeddings,
metadatas: Optional[List[Dict[Any, Any]]] = None,
**kwargs: Any = {}
) -> ElasticKnnSearch| Name | Type | Description |
|---|---|---|
texts* | List[str] | The texts to add to the index. |
embedding* | Embeddings | The embedding model to use for transforming the texts into vectors. |
metadatas | List[Dict[Any, Any]] | Default: NoneA list of metadata dictionaries to associate with the texts. |
**kwargs | Any | Default: {}Arbitrary keyword arguments. |