Skip to content

Commit

Permalink
enhance: print all index params (#236)
Browse files Browse the repository at this point in the history
related: #234

Signed-off-by: zhenshan.cao <[email protected]>
  • Loading branch information
czs007 authored Jan 22, 2024
1 parent 43cb144 commit 132d27a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions states/etcd/show/index.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func printIndex(index IndexInfoV1) {
common.GetKVPair(indexParams, "metric_type"),
)
fmt.Printf("Index Params: %s\n", common.GetKVPair(index.info.GetIndexParams(), "params"))
for _, v := range indexParams {
fmt.Printf("%s:%s", v.GetKey(), v.GetValue())
}
fmt.Println("==================================================================")
}

Expand All @@ -97,4 +100,8 @@ func printIndexV2(index indexpbv2.FieldIndex) {
common.GetKVPair(indexParams, "metric_type"),
)
fmt.Printf("Index Params: %s\n", common.GetKVPair(index.GetIndexInfo().GetUserIndexParams(), "params"))
for _, v := range indexParams {
fmt.Printf("%s:%s", v.GetKey(), v.GetValue())
}
fmt.Println("==================================================================")
}

0 comments on commit 132d27a

Please sign in to comment.