OpensearchVectorStore#

class llama_index.vector_stores.OpensearchVectorStore(client: OpensearchVectorClient)#

Bases: VectorStore

Elasticsearch/Opensearch vector store.

Parameters

client (OpensearchVectorClient) – Vector index client to use for data insertion/querying.

Attributes Summary

client

Get client.

stores_text

Methods Summary

add(nodes, **add_kwargs)

Add nodes to index.

delete(ref_doc_id, **delete_kwargs)

Delete nodes using with ref_doc_id.

query(query, **kwargs)

Query index for top k most similar nodes.

Attributes Documentation

client#

Get client.

stores_text: bool = True#

Methods Documentation

add(nodes: List[BaseNode], **add_kwargs: Any) List[str]#

Add nodes to index.

Parameters

nodes – List[BaseNode]: list of nodes with embeddings.

delete(ref_doc_id: str, **delete_kwargs: Any) None#

Delete nodes using with ref_doc_id.

Parameters

ref_doc_id (str) – The doc_id of the document to delete.

query(query: VectorStoreQuery, **kwargs: Any) VectorStoreQueryResult#

Query index for top k most similar nodes.

Parameters

query (VectorStoreQuery) – Store query object.