@Logan M How can I iterate through all Nodes in a VectorStoreIndex? I used to find
VectorStoreIndex.index_struct.nodes_dict
work for this purpose earlier, or
VectorStoreIndex.docstore.docs
. I find this stopped working after I customized storage_context to use a vectorstore (LanceDB), using a storage context like this:
StorageContext(docstore=<llama_index.core.storage.docstore.simple_docstore.SimpleDocumentStore object at 0x7fe31e89bd30>,
index_store=<llama_index.core.storage.index_store.simple_index_store.SimpleIndexStore object at 0x7fe31e8994e0>,
vector_stores={'default': <llama_index.vector_stores.lancedb.base.LanceDBVectorStore object at 0x7fe31e89b3a0>,
'image': <llama_index.core.vector_stores.simple.SimpleVectorStore object at 0x7fe31e89ba30>},
graph_store=<llama_index.core.graph_stores.simple.SimpleGraphStore object at 0x7fe31e89b9a0>)
All I did was then
index = VectorStoreIndex(nodes, storage_context=storage_context)
index.storage_context.persist()
the
./storage/docstore.json
would be empty. Is this expected? while if I don't customize storage_context, I find
./storage/docstore.json
contains the TextNode I used to create VectorStoreIndex.
I was wishing if I switch to use LanceDB or any other vector store, llama index's behavior with respect to docstore etc would remain unchanged. Am I missing something that's obvious? Thank you for any assistance.