How to view all node details/metadata after loading Index #8614
Replies: 1 comment
-
🤖 Hi @amitguptadumka, Great to see you again and hope you're doing well! To view each node's details or metadata in the loaded index without performing a specific query or search, you can use the Here is how you can use it: # Assuming you have an instance of TreeIndex named tree_index
ref_doc_info = tree_index.ref_doc_info
# Now you can iterate over the ref_doc_info to view each node's details
for node_id, node_info in ref_doc_info.items():
print(f"Node ID: {node_id}")
print(f"Node Info: {node_info}") This will print the details of each node in the loaded index. The
You can find more details in the source code of the LlamaIndex repository:
I hope this helps! If you have any other questions, feel free to ask. Best, Sources
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research. Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant. If you want to continue the conversation, start your reply with @dosu-bot. |
Beta Was this translation helpful? Give feedback.
-
I have created an embedding index and saved it in a vector DB. Now when i load the index using
index = load_index_from_storage(storage_context=storage_context,service_context = service_context)
is working fine for retrieval and query response. But suppose i want to view each node without any specific query/search how do i view that?
Beta Was this translation helpful? Give feedback.
All reactions