Skip to content

Commit

Permalink
Add FieldID in show index output (#184)
Browse files Browse the repository at this point in the history
Signed-off-by: Congqi Xia <[email protected]>
  • Loading branch information
congqixia authored Aug 17, 2023
1 parent 8c61d0c commit 19645ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions states/etcd/show/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand All @@ -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()
Expand Down

0 comments on commit 19645ea

Please sign in to comment.