Skip to main content
Retrieves documents by their IDs from the vector store.
Available in Python SDK and JS/TS SDK. For the Embedded library, use get_by_id(), get_by_ids(), get_document(), or get_documents() directly on the CyborgVectorStore instance.
get(ids: List[str]) -> List[Document]

Parameters

ParameterTypeDescription
idsList[str]List of document IDs to retrieve

Returns

List[Document]: List of Document objects matching the given IDs

Example Usage

# Retrieve specific documents by ID
doc_ids = ["doc1", "doc2", "doc3"]
documents = store.get(doc_ids)

for doc in documents:
    print(f"Content: {doc.page_content[:100]}...")
    print(f"Metadata: {doc.metadata}")