Skip to content

Commit

Permalink
enhance: update milvus-proto and correct index.drop() (#2142)
Browse files Browse the repository at this point in the history
Index name and field name is already there for Index object, No need to
get them from kwargs when drop

```python
ivf_flat = Index(c, "embeddings", params, index_name="ivf_flat",
    construct_only=True)
ivf_flat.drop()
```

---------

Signed-off-by: yangxuan <[email protected]>
  • Loading branch information
XuanYang-cn authored Jun 18, 2024
1 parent cddbf61 commit f7a4839
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 4 additions & 2 deletions .github/mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ pull_request_rules:
- or:
- base=master
- base~=2\.\d
- "status-success=Run Python Tests (3.8)"
- "status-success=Run Python Tests (3.8, windows-latest)"
- "status-success=Run Python Tests (3.12, windows-latest)"
- "status-success=Run Python Tests (3.8, ubuntu-latest)"
- "status-success=Run Python Tests (3.12, ubuntu-latest)"
- "status-success=Run Check Proto (3.8)"
- "status-success=Code lint check (3.8)"
- "status-success=Run Python Tests (3.12)"
- "status-success=Run Check Proto (3.12)"
- "status-success=Code lint check (3.12)"
actions:
Expand Down
7 changes: 2 additions & 5 deletions pymilvus/orm/index.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,10 +73,8 @@ def __init__(
self._collection = collection
self._field_name = field_name
self._index_params = index_params
index_name = kwargs.get("index_name", Config.IndexName)
self._index_name = index_name
self._kwargs = kwargs
if self._kwargs.pop("construct_only", False):
self._index_name = kwargs.get("index_name", Config.IndexName)
if kwargs.get("construct_only", False):
return

conn = self._get_connection()
Expand Down Expand Up @@ -137,5 +135,4 @@ def drop(self, timeout: Optional[float] = None, **kwargs):
field_name=self.field_name,
index_name=self.index_name,
timeout=timeout,
**kwargs,
)

0 comments on commit f7a4839

Please sign in to comment.