From 19645ea37c82d5bd9ceef2b8465034c3f16cb55c Mon Sep 17 00:00:00 2001 From: congqixia Date: Thu, 17 Aug 2023 10:06:12 +0800 Subject: [PATCH] Add FieldID in show index output (#184) Signed-off-by: Congqi Xia --- states/etcd/show/index.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/states/etcd/show/index.go b/states/etcd/show/index.go index b59c780..00a3bcb 100644 --- a/states/etcd/show/index.go +++ b/states/etcd/show/index.go @@ -73,7 +73,7 @@ func (c *ComponentShow) listIndexMetaV2(ctx context.Context) ([]indexpbv2.FieldI func printIndex(index IndexInfoV1) { fmt.Println("==================================================================") - fmt.Printf("Index ID: %d\tIndex Name: %s\tCollectionID:%d\n", index.info.GetIndexID(), index.info.GetIndexName(), index.collectionID) + fmt.Printf("Index ID: %d\tIndex Name: %s\tCollectionID: %d\n", index.info.GetIndexID(), index.info.GetIndexName(), index.collectionID) indexParams := index.info.GetIndexParams() fmt.Printf("Index Type: %s\tMetric Type: %s\n", common.GetKVPair(indexParams, "index_type"), @@ -85,7 +85,7 @@ func printIndex(index IndexInfoV1) { func printIndexV2(index indexpbv2.FieldIndex) { fmt.Println("==================================================================") - fmt.Printf("Index ID: %d\tIndex Name: %s\tCollectionID:%d\n", index.GetIndexInfo().GetIndexID(), index.GetIndexInfo().GetIndexName(), index.GetIndexInfo().GetCollectionID()) + fmt.Printf("Index ID: %d\tIndex Name: %s\tCollectionID: %d\tFieldID: %d\n", index.GetIndexInfo().GetIndexID(), index.GetIndexInfo().GetIndexName(), index.GetIndexInfo().GetCollectionID(), index.GetIndexInfo().GetFieldID()) createTime, _ := utils.ParseTS(index.GetCreateTime()) fmt.Printf("Create Time: %s\tDeleted: %t\n", createTime.Format(tsPrintFormat), index.GetDeleted()) indexParams := index.GetIndexInfo().GetIndexParams()