Find answers from the community

Updated 3 months ago

#persist the nodes

#persist the nodes
index.storage_context.persist()
....

load the persist nodes

index = load_index_from_storage(StorageContext.from_defaults(), service_context=service_context)

get nodes

nodes = index.docstore.docs

#use it further in your retriever
L
a
2 comments
what line causes this error?

I think how you get nodes is incorrect

It should be nodes = index.docstore.docs.values()
it worked thanks
Add a reply
Sign up and join the conversation on Discord