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

fix index apis #23

Merged
merged 1 commit into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions milvus_cli/scripts/milvus_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ def connection(obj, showAll):
except Exception as e:
click.echo("No connections.")
else:
click.echo(obj.showConnection(showAll=showAll))
click.echo(obj.showConnection(False,showAll=showAll))


@show.command("loading_progress")
Expand Down Expand Up @@ -926,7 +926,7 @@ def deletePartition(obj, collectionName, partition, timeout):
"--collection-name",
"collectionName",
help="Collection name")
@click.option("-in", "--index-name", "Index name", help="Index name")
@click.option("-in", "--index-name", "indexName", help="Index name")
@click.option(
"-t",
"--timeout",
Expand All @@ -943,7 +943,7 @@ def deleteIndex(obj, collectionName, indexName, timeout):

Example:

milvus_cli > delete index -c car
milvus_cli > delete index -c car -in indexName
"""
click.echo(
"Warning!\nYou are trying to delete the index of collection. This action cannot be undone!\n"
Expand All @@ -957,8 +957,7 @@ def deleteIndex(obj, collectionName, indexName, timeout):
click.echo(f"Error occurred when get collection by name!\n{str(e)}")
else:
result = obj.dropIndex(collectionName, indexName, timeout)
click.echo("Drop index successfully!") if not result else click.echo(
"Drop index failed!")
click.echo(result)


@deleteObject.command("user")
Expand Down
2 changes: 0 additions & 2 deletions milvus_cli/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,6 @@ def search(self, collectionName, searchParameters, prettierFormat=True):

def query(self, collectionName, queryParameters):
collection = self.getTargetCollection(collectionName)
print(queryParameters)
res = collection.query(**queryParameters)
# return f"- Query results: {res}"
if not len(res):
Expand Down Expand Up @@ -589,7 +588,6 @@ def listCollectionAlias(self, collectionName, timeout=None):

collection = self.getTargetCollection(collectionName)
result = utility.list_aliases(collection.name, timeout=timeout)
print("alias==>", result)
return result

def loadBalance(self,
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setup(
name="milvus_cli",
version="v0.3.1",
version="v0.3.2",
author="Milvus Team",
author_email="milvus-team@zilliz.com",
url="https://github.com/zilliztech/milvus_cli",
Expand Down