Skip to content

Commit

Permalink
Merge pull request #23 from zilliztech/fix-index-apis
Browse files Browse the repository at this point in the history
fix index apis
  • Loading branch information
shanghaikid authored Jan 9, 2023
2 parents e0e91eb + 9cd3468 commit f353de4
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
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

0 comments on commit f353de4

Please sign in to comment.