Hi all, I have a default storage. I want to delete some nodes so that they cannot be queried in subsequent queries. I tried the following code, but it doesn't work:
from llama_index import (
StorageContext,
load_index_from_storage,
)
path = r"C:\Users\..."
storage_context = StorageContext.from_defaults(persist_dir=path)
index = load_index_from_storage(storage_context, use_async=True)
index.delete_ref_doc( hash_id, delete_from_docstore=True)
myquery = index.as_query_engine())
response = myquery.query(question)
What step am I missing?