From ee12062deeb1d65a40898c7ea799d45d3e11efce Mon Sep 17 00:00:00 2001 From: Benjamin Ran Date: Mon, 18 Apr 2022 16:59:23 +0300 Subject: [PATCH] Add delete filter parsing to grpc_index --- pinecone/core/grpc/index_grpc.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pinecone/core/grpc/index_grpc.py b/pinecone/core/grpc/index_grpc.py index 7c8e39c7..59e7e287 100644 --- a/pinecone/core/grpc/index_grpc.py +++ b/pinecone/core/grpc/index_grpc.py @@ -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)