Skip to content

Commit

Permalink
Merge pull request #81 from zilliztech/fix-describe-index
Browse files Browse the repository at this point in the history
feat: support show index for milvus2.4
  • Loading branch information
shanghaikid authored Jun 18, 2024
2 parents 0a65bc4 + d15a9d2 commit c348879
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion milvus_cli/Index.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,17 @@ def get_index_details(
index = collection.index(index_name=indexName)
if not index:
return "No index!"

rows = []
rows.append(["Corresponding Collection", index.collection_name])
rows.append(["Corresponding Field", index.field_name])
rows.append(["Index Name", index.index_name])

rows.append(["Index Type", index.params["index_type"]])
rows.append(["Metric Type", index.params["metric_type"]])
params = index.params["params"]
params = index.params.get("params", {})
paramsDetails = "\n- ".join(map(lambda k: f"{k[0]}: {k[1]}", params.items()))

rows.append(["Params", paramsDetails])
return tabulate(rows, tablefmt="grid")

Expand Down

0 comments on commit c348879

Please sign in to comment.