diff --git a/internal/proxy/task_index_test.go b/internal/proxy/task_index_test.go index f169143d80..75af9b2464 100644 --- a/internal/proxy/task_index_test.go +++ b/internal/proxy/task_index_test.go @@ -20,6 +20,7 @@ import ( "context" "os" "sort" + "strconv" "testing" "github.com/cockroachdb/errors" @@ -708,7 +709,8 @@ func Test_parseIndexParams(t *testing.T) { assert.NoError(t, err) sortKeyValuePairs(cit.newIndexParams) assert.Equal(t, cit.newIndexParams, []*commonpb.KeyValuePair{ - {Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED}, + {Key: common.IndexTypeKey, Value: indexparamcheck.IndexHybrid}, + {Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)}, }) }) @@ -936,7 +938,8 @@ func Test_parseIndexParams(t *testing.T) { assert.NoError(t, err) sortKeyValuePairs(cit.newIndexParams) assert.Equal(t, cit.newIndexParams, []*commonpb.KeyValuePair{ - {Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED}, + {Key: common.IndexTypeKey, Value: indexparamcheck.IndexHybrid}, + {Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)}, }) }) @@ -965,7 +968,8 @@ func Test_parseIndexParams(t *testing.T) { assert.NoError(t, err) sortKeyValuePairs(cit.newIndexParams) assert.Equal(t, cit.newIndexParams, []*commonpb.KeyValuePair{ - {Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED}, + {Key: common.IndexTypeKey, Value: indexparamcheck.IndexHybrid}, + {Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)}, }) }) diff --git a/pkg/util/paramtable/autoindex_param.go b/pkg/util/paramtable/autoindex_param.go index 41dcebb6f9..cc24d9f5d0 100644 --- a/pkg/util/paramtable/autoindex_param.go +++ b/pkg/util/paramtable/autoindex_param.go @@ -172,7 +172,7 @@ func (p *AutoIndexConfig) init(base *BaseTable) { p.ScalarAutoIndexParams = ParamItem{ Key: "scalarAutoIndex.params.build", Version: "2.4.0", - DefaultValue: `{"int": "INVERTED", "float": "INVERTED", "varchar": "INVERTED", "bool": "BITMAP"}`, + DefaultValue: `{"int": "HYBRID","varchar": "INVERTED","bool": "BITMAP", "float": "INVERTED"}`, } p.ScalarAutoIndexParams.Init(base.mgr)