doc_id = "your_doc_id" index.delete(doc_id)
documents = SimpleDirectoryReader("../data/paul_graham").load_data() for document in documents: document.id_ = "your_document_id"
# Add a new document new_document = Document(text="This isn't in the index yet, but it will be soon!", id_="doc_id_3")