Returns
True if deletion is successful,
False otherwise, None if not implemented.
Return type
Optional[bool]
delete_documents_with_document_id(id_list: List[str]) → bool[source]¶
Delete documents based on their IDs.
Parameters
id_list – List of document IDs.
Returns
Whether the deletion was successful or not.
delete_documents_with_texts(texts: List[str]) → bool[source]¶
Delete documents based on their page content.
Parameters
texts – List of document page content.
Returns
Whether the deletion was successful or not.
classmethod from_documents(documents: List[Document], embedding: Embeddings, config: Optional[AlibabaCloudOpenSearchSettings] = None, **kwargs: Any) → AlibabaCloudOpenSearch[source]¶
Create alibaba cloud opensearch vector store instance.
Parameters
documents – Documents to be inserted into the vector storage,
should not be empty.
embedding – Embedding function, Embedding function.
config – Alibaba OpenSearch instance configuration.
ids – Specify the ID for the inserted document. If left empty, the ID will be
automatically generated based on the text content.
Returns
Alibaba cloud opensearch vector store instance.
Return type
AlibabaCloudOpenSearch
classmethod from_texts(texts: List[str], embedding: Embeddings, metadatas: Optional[List[dict]] = None, config: Optional[AlibabaCloudOpenSearchSettings] = None, **kwargs: Any) → AlibabaCloudOpenSearch[source]¶
Create alibaba cloud opensearch vector store instance.
Parameters
texts – The text segments to be inserted into the vector storage,
should not be empty.
embedding – Embedding function, Embedding function.
config – Alibaba OpenSearch instance configuration.
metadatas – Metadata information.
Returns
Alibaba cloud opensearch vector store instance.
Return type