Zack Saadioui
8/26/2024
1 2 3 4from llama_index.core import SummaryIndex, Document index = SummaryIndex([]) doc_chunks = [Document(text="text_chunk_1", id_="doc_id_1")] # add more as needed index.insert(doc_chunks)
1
2
python
index.delete_ref_doc("doc_id_0", delete_from_docstore=True)1
2
python
index.update_ref_doc(doc_chunks[0], update_kwargs={"delete_kwargs": {"delete_from_docstore": True}})1
2
python
refreshed_docs = index.refresh_ref_docs(doc_chunks)1
2
python
metadata = {"author": "John Doe", "date": "2024-01-01"}1
2
python
Settings.chunk_size = 512  # or any size based on your data typeCopyright © Arsturn 2025