Not working - Delete vectors via API filtered by metadata

I am using Bubble, but testing in Postman and get the same results in both with the following API call. The call completes without errors but the vectors are still there when I search from the Pinecone Browser. The API key is in the headers. Can anyone tell me what i’m doing wrong? Many thanks in advance.

If anyone is able to help me with this it would be very much appreciated.

I am not on the gcpstarter region, which does not support deleting by metadata, but I am on the free plan having signed up quite a few months ago. I wonder if I am being restricted as if on the gcpstarter region despite not being? Has anyone experienced this?

Hi @keiran

could you try just deleting without metadata, instead only deleting by ids? If that works, then maybe something is being restricted. Maybe also remove the deleteAll parameter (its false by default so no worries).

What you are passing look alright.

Hope this helps

Thanks @Jasper
I have tried as you suggested…

No errors are returned, but still nothing is deleted.

So even if I were being restricted as if on gcpstarter environment, this should still be working right? Is there something else I could be doing wrong?


How are you verifying that the vectors are not being deleted?

Worth noting that even if no changes occur the return result will always appear as if it is completed. Unless the request is malformed the response will always look OK.

The second image you posted is a correct JSON body to support deletion. Just to double check are you sending Content-Type in the request as well as confirming the specific ID no longer exists after the delete, correct?

From the screenshot nothing seems amiss about your request at all.

I’m just using the browser on the Pinecone site. I just checked again in case there was a delay between making the request and deleting, but it’s been 12 hours now and the one I tried to delete in the post above is still there.

Thanks, helpful to know that. I do have Content-Type in the header as per the image below (API key was only removed for the screenshot). And I’m using the Pinecone Browser to check if the vector has been deleted or not.

Can you try querying for the data through Postman? I’m wondering if the browser portal might be caching the data locally, and maybe it just isn’t being invalidated when the data is deleted.

The browser shouldn’t be caching anything, so this is very unexpected behavior.

@keiran, can you directly delete the vector from within the browser in the console? Just to confirm that it can be deleted. If it works there, then something must be going on with your code. If not, something else is wrong.

FWIW, I checked your index and only saw delete operations on the 19th, nothing before then. So, I suspect your call to delete isn’t making it to the service for some reason.

Hi @Cory_Pinecone

I have just deleted the above vector from the browser which worked immediately. It no longer appears when I search for it in the browser, which I guess answers the browser caching question @silas

I just tried changing my API key and deleting another vector by ID from Postman but exactly the same result. The metrics dashboard is not registering any delete calls, only queries. Why would this be happening?

Ok, great, so it’s definitely not a problem with the index. It’s probably not a problem with the API key, either, because you would get an error back if it were.

Are you working behind a proxy or anything? Have you confirmed that GET requests for queries work from Postman? I see that they do when you use the browser, but I want to confirm they work for you from Postman, specifically.

Just got back on this after the holidays - it seems I can delete using metadata filters or vector IDs on different namespaces, just not the one I was trying above. Get requests do work too. Strangely though, in the Metrics tab the requests are showing as Queries not Delete. The Delete request that is shown was when I deleted one by vector ID rather than filtered by metadata.

Still curious why the first namespace I was using doesn’t let me delete anything but others do. Any ideas?

Do your other namespaces have spaces in them? It could be the namespace value isn’t being passed properly, so when it hits Pinecone the service sees it as “UNION” not “UNION PRIMARY…”.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.