pinecone-io / pinecone-python-client

The Pinecone Python client
https://www.pinecone.io/docs
Apache License 2.0
286 stars 79 forks source link

Serverless: Delete all records for a parent document #293

Closed bdonkey closed 7 months ago

bdonkey commented 8 months ago

The online documentation under the Delete all records for a parent document heading tells us to first fetch the vectors then delete:

To delete all records representing chunks of a single document, 
first fetch the record IDs based on their common ID prefix and then delete the records by ID.

The fetch documentation gives us the curl command:

PINECONE_API_KEY="YOUR_API_KEY"
INDEX_HOST="INDEX_HOST"

curl -X POST "https://$INDEX_HOST/vectors/list" \
  -H "Api-Key: $PINECONE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
        "namespace": "ns1",
        "prefix": "doc1#",
        "pagination_token": "c2Vjb25kY2FsbA=="
      }'

This command does not work and doesn't make sense?

If we change the POST to a --request GET then fetch works.

opbenesh commented 7 months ago

Hi @bdonkey, thanks for reporting this. There was a mismatch in the documentation, but the rag page has been fixed.