Hello!
I am trying to get all the unique iterations of a metadata value from my pinecone index, do you know how I can achieve this on my node.js?
I am not sure what function to use. I currently have 107,240 vectors stored in the database and they all have different metadata values such as “brand”, “price”. I want to get all the unique results of the “brand” metadata so I know which brands I have added in my vector database, can anyone help?
@dhruv.sharma ,
Welcome to the Pinecone Community Forum!
The Pinecone API does not have an operation that will retrieve all of the possible results of a metadata field. However, you can write a script to accomplish this. The listPaginated operation will get the IDs of all of the records in your index. Then, you can call the fetch operation on your vector IDs to get the corresponding metadata and store it in a Set object.
Please take a look at List vector IDs and Fetch vectors for more information.
Best,
Evan