refresh_ref_docs won't actually work with vector store integrations.
It depends on the
docstore
layer for managing which documents have been inserted, and which nodes belong to each inserted document
You can explicitly enable the docstore when creating/using your index by setting the override kwarg
VectorStoreIndex.from_documents(docs, service_context=service_context, storage_context=storage_context, store_nodes_override=True)
But then you'll have to manage the docstore and index store yourself
# saving
index.storage_context.docstore.persist(persist_path="storage/docstore.json")
index.storage_context.index_store.persist(persist_path="storage/index_store.json")
...
# loading
storage_context = StorageContext.from_defaults(
docstore=SimpleDocumentStore.from_persist_dir("./storage"),
index_store=SimpleIndexStore.from_persist_dir("./storage"),
vector_store=vector_store
)