@@ -58,24 +58,40 @@ type VectorIndexInfo struct {
58
58
DistanceMetric DistanceMetric `json:"distance_metric"`
59
59
}
60
60
61
+ type ParserType string
62
+
63
+ const (
64
+ ParserTypeAuto ParserType = "auto"
65
+ ParserTypeStandard ParserType = "standard"
66
+ // ...
67
+ )
68
+
69
+ // FulltextIndexInfo is the information of fulltext index of a column.
70
+ type FulltextIndexInfo struct {
71
+ ParserType ParserType `json:"parser_type"`
72
+ // not provide any parameters for now
73
+ IndexParameters map [string ]string `json:"index_parameters"`
74
+ }
75
+
61
76
// IndexInfo provides meta data describing a DB index.
62
77
// It corresponds to the statement `CREATE INDEX Name ON Table (Column);`
63
78
// See https://dev.mysql.com/doc/refman/5.7/en/create-index.html
64
79
type IndexInfo struct {
65
- ID int64 `json:"id"`
66
- Name ast.CIStr `json:"idx_name"` // Index name.
67
- Table ast.CIStr `json:"tbl_name"` // Table name.
68
- Columns []* IndexColumn `json:"idx_cols"` // Index columns.
69
- State SchemaState `json:"state"`
70
- BackfillState BackfillState `json:"backfill_state"`
71
- Comment string `json:"comment"` // Comment
72
- Tp ast.IndexType `json:"index_type"` // Index type: Btree, Hash, Rtree or HNSW
73
- Unique bool `json:"is_unique"` // Whether the index is unique.
74
- Primary bool `json:"is_primary"` // Whether the index is primary key.
75
- Invisible bool `json:"is_invisible"` // Whether the index is invisible.
76
- Global bool `json:"is_global"` // Whether the index is global.
77
- MVIndex bool `json:"mv_index"` // Whether the index is multivalued index.
78
- VectorInfo * VectorIndexInfo `json:"vector_index"` // VectorInfo is the vector index information.
80
+ ID int64 `json:"id"`
81
+ Name ast.CIStr `json:"idx_name"` // Index name.
82
+ Table ast.CIStr `json:"tbl_name"` // Table name.
83
+ Columns []* IndexColumn `json:"idx_cols"` // Index columns.
84
+ State SchemaState `json:"state"`
85
+ BackfillState BackfillState `json:"backfill_state"`
86
+ Comment string `json:"comment"` // Comment
87
+ Tp ast.IndexType `json:"index_type"` // Index type: Btree, Hash, Rtree or HNSW
88
+ Unique bool `json:"is_unique"` // Whether the index is unique.
89
+ Primary bool `json:"is_primary"` // Whether the index is primary key.
90
+ Invisible bool `json:"is_invisible"` // Whether the index is invisible.
91
+ Global bool `json:"is_global"` // Whether the index is global.
92
+ MVIndex bool `json:"mv_index"` // Whether the index is multivalued index.
93
+ VectorInfo * VectorIndexInfo `json:"vector_index"` // VectorInfo is the vector index information.
94
+ FulltextInfo * FulltextIndexInfo `json:"fulltext_index"` // FulltextInfo is the fulltext index information.
79
95
}
80
96
81
97
// Hash64 implement HashEquals interface.
0 commit comments