Hi.
As explained here Manage RAG documents, I defined an ID prefixes rule to reference parent documents. Now i want to list all vectors based on prefix with this script
for ids in index.list(prefix=‘doc1#’, namespace=‘ns1’):
print(ids)
Unfortunately when i run this code I get this error: ‘Index’ object has no attribute ‘list’.
How can I solve this problem?
Thanks
HI @damiano.tedoldi, are you using a serverless index? Please note that the list
operation is supported only for serverless indexes.
If you are using a serverless index, please share how you are connecting to the index. For example, you may be using index = pc.Index("<index_name>")
.
Hi Zeke,
thanks for your reply. Yes, I’m using a serverless index.
For connecting to the index I use index = pc.Index(“<index_name>”) .
Thanks
@damiano.tedoldi Please ensure you are using v3.1.0 of the pinecone-python-client
. Only this most recent version supports the list
operation.
1 Like
Hi Zeke,
thanks for your reply and your suggestion.
It works for me!