Skip to content

Commit

Permalink
Revert "fix:reset default auto index type for scalar (#37086)" (#39820)
Browse files Browse the repository at this point in the history
This reverts commit eeb67a3.
pr: #39819

Signed-off-by: luzhang <[email protected]>
Co-authored-by: luzhang <[email protected]>
  • Loading branch information
zhagnlu and luzhang authored Feb 13, 2025
1 parent a50249e commit 16ea4fc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions internal/proxy/task_index_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import (
"context"
"os"
"sort"
"strconv"
"testing"

"github.com/cockroachdb/errors"
Expand Down Expand Up @@ -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)},
})
})

Expand Down Expand Up @@ -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)},
})
})

Expand Down Expand Up @@ -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)},
})
})

Expand Down
2 changes: 1 addition & 1 deletion pkg/util/paramtable/autoindex_param.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 16ea4fc

Please sign in to comment.