Skip to content

Commit 8433d8b

Browse files
committed
Update changelog and vector delete docs
1 parent 7aeaa06 commit 8433d8b

File tree

7 files changed

+56
-48
lines changed

7 files changed

+56
-48
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Changelog
22

33
## Unreleased Changes
4+
### Changed
5+
- Added support for deleting vectors by metadata filter. The pinecone.Index.delete() api now accepts an additional filter= parameter which takes metadata filter expression equivalent to what query() supports.
6+
- Internally these requests are now sent as POST requests, though the previous DELETE api is still supported.
7+
48
## [2.0.9](https://github.com/pinecone-io/pinecone-python-client/compare/v2.0.8...v2.0.9)
59
### Changed
610
- Added [update](https://www.pinecone.io/docs/api/operation/update/) API. Allows updates to a vector and it's metadata.

pinecone/core/client/api/vector_operations_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ def __delete1(
185185
186186
Keyword Args:
187187
ids ([str]): Vectors to delete.. [optional]
188-
delete_all (bool): This indicates that all vectors in the index namespace should be deleted.. [optional]
188+
delete_all (bool): This indicates that all vectors in the index namespace should be deleted.. [optional] if omitted the server will use the default value of False
189189
namespace (str): The namespace to delete vectors from, if applicable.. [optional]
190190
_return_http_data_only (bool): response data without head status
191191
code and headers. Default is True.

pinecone/core/client/model/delete_request.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
148148
through its discriminator because we passed in
149149
_visited_composed_classes = (Animal,)
150150
ids ([str]): Vectors to delete.. [optional] # noqa: E501
151-
delete_all (bool): This indicates that all vectors in the index namespace should be deleted.. [optional] # noqa: E501
151+
delete_all (bool): This indicates that all vectors in the index namespace should be deleted.. [optional] if omitted the server will use the default value of False # noqa: E501
152152
namespace (str): The namespace to delete vectors from, if applicable.. [optional] # noqa: E501
153-
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
153+
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying ids to delete in the ids param or using delete_all=True. See https://www.pinecone.io/docs/metadata-filtering/`.. [optional] # noqa: E501
154154
"""
155155

156156
_check_type = kwargs.pop('_check_type', True)
@@ -233,9 +233,9 @@ def __init__(self, *args, **kwargs): # noqa: E501
233233
through its discriminator because we passed in
234234
_visited_composed_classes = (Animal,)
235235
ids ([str]): Vectors to delete.. [optional] # noqa: E501
236-
delete_all (bool): This indicates that all vectors in the index namespace should be deleted.. [optional] # noqa: E501
236+
delete_all (bool): This indicates that all vectors in the index namespace should be deleted.. [optional] if omitted the server will use the default value of False # noqa: E501
237237
namespace (str): The namespace to delete vectors from, if applicable.. [optional] # noqa: E501
238-
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
238+
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): If specified, the metadata filter here will be used to select the vectors to delete. This is mutually exclusive with specifying ids to delete in the ids param or using delete_all=True. See https://www.pinecone.io/docs/metadata-filtering/`.. [optional] # noqa: E501
239239
"""
240240

241241
_check_type = kwargs.pop('_check_type', True)

pinecone/core/client/model/query_request.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ def _from_openapi_data(cls, top_k, queries, *args, **kwargs): # noqa: E501
166166
through its discriminator because we passed in
167167
_visited_composed_classes = (Animal,)
168168
namespace (str): The namespace to query.. [optional] # noqa: E501
169-
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
169+
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The filter to apply if no filter is specified in `QueryVector. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/`.. [optional] # noqa: E501
170170
include_values (bool): Indicates whether vector values are included in the response.. [optional] if omitted the server will use the default value of False # noqa: E501
171171
include_metadata (bool): Indicates whether metadata is included in the response as well as the ids.. [optional] if omitted the server will use the default value of False # noqa: E501
172172
"""
@@ -257,7 +257,7 @@ def __init__(self, top_k, queries, *args, **kwargs): # noqa: E501
257257
through its discriminator because we passed in
258258
_visited_composed_classes = (Animal,)
259259
namespace (str): The namespace to query.. [optional] # noqa: E501
260-
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): [optional] # noqa: E501
260+
filter ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The filter to apply if no filter is specified in `QueryVector. You can use vector metadata to limit your search. See https://www.pinecone.io/docs/metadata-filtering/`.. [optional] # noqa: E501
261261
include_values (bool): Indicates whether vector values are included in the response.. [optional] if omitted the server will use the default value of False # noqa: E501
262262
include_metadata (bool): Indicates whether metadata is included in the response as well as the ids.. [optional] if omitted the server will use the default value of False # noqa: E501
263263
"""

0 commit comments

Comments
 (0)