Retrieve All Documents inside an index

I am building a RAG app where a user can add/remove documents on the left and chat about those documents on the right.

Adding seems to be all well and good, but I cant seem to query the db for the documents found inside the DB. People suggest I list Id’s based on a prefix, but if I dont know the prefix, how can I get the documents?

IMO
There should just be a way to do something like
PineconeStore.listDocuments(pineconeIndex)
and get the names and Ids of the documents, that way I can set up a delete function to go with it.

@info8 Thanks for the post! Are you by chance using LangChain’s PineconeVectorStore from the langchain_pinecone package?

[I am using PineconeStore from the @langchain/pinecone package
(JavasSript)

@info8 That package is built and managed by LangChain. I recommend you post on their forums or create an issue on their GitHub repository to share your question/feature request.

If you have not explored it already, the vectorStore.similaritySearch method allows you to retrieve the most similar documents (LangChain docs).

As far as I know, you cannot list the documents in a vectorstore object. If you use the Pinecone API and have a serverless index, you can use the List operation to list your records (Pinecone docs).