Skip to content

[Bug] Delete using metadata filter not working #432

Open

Description

@abhishekkumar-9

Is this a new bug?
In other words: Is this an error, flaw, failure or fault? Please search Github issues and check our Community Forum to see if someone has already reported the bug you encountered. Yes

If this is a request for help or troubleshooting code in your own Pinecone project, please join the Pinecone Community Forum.

  • I believe this is a new bug
  • I have searched the existing Github issues and Community Forum, and I could not find an existing post for this bug

Describe the bug
Describe the functionality that was working before but is broken now.
It never worked or I never saw it working before but it is in the documentation.

**Error information**
If you have one, please include the full stack trace here. If not, please share as much as you can about the error.
``
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/langchain_pinecone/vectorstores.py", line 636, in delete
    self._index.delete(filter=filter, namespace=namespace, **kwargs)
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/utils/error_handling.py", line 11, in inner_func
    return func(*args, **kwargs)
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/data/index.py", line 316, in delete
    return self._vector_api.delete(
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/api_client.py", line 761, in __call__
    return self.callable(self, *args, **kwargs)
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/data/api/data_plane_api.py", line 267, in __delete
    return self.call_with_http_info(**kwargs)
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/api_client.py", line 819, in call_with_http_info
    return self.api_client.call_api(
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/api_client.py", line 380, in call_api
    return self.__call_api(
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/api_client.py", line 187, in __call_api
    raise e
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/api_client.py", line 175, in __call_api
    response_data = self.request(
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/api_client.py", line 460, in request
    return self.rest_client.POST(
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/rest.py", line 345, in POST
    return self.request(
  File "/Users/L064665/.local/share/virtualenvs/cortex-api-pmBDIyeR/lib/python3.10/site-packages/pinecone/core/openapi/shared/rest.py", line 279, in request
    raise PineconeApiException(http_resp=r)
pinecone.core.openapi.shared.exceptions.PineconeApiException: (400)
Reason: Bad Request
HTTP response headers: HTTPHeaderDict({'Date': 'Tue, 21 Jan 2025 18:17:28 GMT', 'Content-Type': 'application/json', 'Content-Length': '52', 'Connection': 'keep-alive', 'x-pinecone-request-latency-ms': '3', 'x-pinecone-request-id': '436080438834473444', 'x-envoy-upstream-service-time': '0', 'server': 'envoy'})
HTTP response body: {"code":3,"message":"Invalid request.","details":[]}

Steps to reproduce the issue locally
Include steps to reproduce the issue here. If you have sample code or a script that can be used to replicate this issue, please include that as well (including any dependent files to run the code).

filter = {"source":{"$eq":"value"}}
index.delete(ids=None, delete_all=False, namespace=None, filter=filter)

Environment

  • OS Version: Mac Latest
  • Python version: 3.10
  • Python SDK version: 5.0.1

Additional context
Add any other context about the problem here.

Activity

  1. added
    bug
    on Jan 22, 2025
  2. added
    status:needs-triage
    on Jan 22, 2025
  3. anawishnoff commented on Mar 4, 2025

    @anawishnoff

    Hi @abhishekkumar-9 , deleting by metadata is not supported in serverless indexes today, but is on the roadmap and we expect to add support in the near future.

  4. removed
    status:needs-triage
    on Mar 4, 2025
  5. added
    status:needs-triage
    on Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugstatus:needs-triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions