Skip to content

Commit

Permalink
Add delete filter parsing to grpc_index
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminran committed Apr 18, 2022
1 parent 9c423aa commit ee12062
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pinecone/core/grpc/index_grpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ def _vector_transform(item):
return self._wrap_grpc_call(self.stub.Upsert, request, timeout=timeout)

def delete(self, *args, async_req=False, **kwargs):
request = DeleteRequest(*args, **kwargs)
_filter = dict_to_proto_struct(kwargs.pop('filter', None))
request = DeleteRequest(*args, **kwargs, filter=_filter)
timeout = kwargs.pop('timeout', None)
if async_req:
future = self._wrap_grpc_call(self.stub.Delete.future, request, timeout=timeout)
Expand Down

0 comments on commit ee12062

Please sign in to comment.