Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Delete using metadata filter not working #432

Open
2 tasks
abhishekkumar-9 opened this issue Jan 22, 2025 · 0 comments
Open
2 tasks

[Bug] Delete using metadata filter not working #432

abhishekkumar-9 opened this issue Jan 22, 2025 · 0 comments
Labels
bug Something isn't working status:needs-triage An issue that needs to be triaged by the Pinecone team

Comments

@abhishekkumar-9
Copy link

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.

@abhishekkumar-9 abhishekkumar-9 added the bug Something isn't working label Jan 22, 2025
@github-actions github-actions bot added the status:needs-triage An issue that needs to be triaged by the Pinecone team label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working status:needs-triage An issue that needs to be triaged by the Pinecone team
Projects
None yet
Development

No branches or pull requests

1 participant