mirror of https://github.com/milvus-io/milvus.git
fix:reset default auto index type for scalar (#37086)
#32900 Signed-off-by: luzhang <luzhang@zilliz.com> Co-authored-by: luzhang <luzhang@zilliz.com>pull/37169/head
parent
a2f0092e39
commit
eeb67a3845
|
@ -21,7 +21,6 @@ import (
|
|||
"encoding/json"
|
||||
"os"
|
||||
"sort"
|
||||
"strconv"
|
||||
"testing"
|
||||
|
||||
"github.com/cockroachdb/errors"
|
||||
|
@ -665,8 +664,7 @@ 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.IndexHybrid},
|
||||
{Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)},
|
||||
{Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED},
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -709,8 +707,7 @@ 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.IndexHybrid},
|
||||
{Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)},
|
||||
{Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED},
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -938,8 +935,7 @@ 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.IndexHybrid},
|
||||
{Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)},
|
||||
{Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED},
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -968,8 +964,7 @@ 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.IndexHybrid},
|
||||
{Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)},
|
||||
{Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED},
|
||||
})
|
||||
})
|
||||
|
||||
|
@ -998,8 +993,7 @@ 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.IndexHybrid},
|
||||
{Key: common.BitmapCardinalityLimitKey, Value: strconv.Itoa(paramtable.DefaultBitmapCardinalityLimit)},
|
||||
{Key: common.IndexTypeKey, Value: indexparamcheck.IndexINVERTED},
|
||||
})
|
||||
})
|
||||
|
||||
|
|
|
@ -170,7 +170,7 @@ func (p *autoIndexConfig) init(base *BaseTable) {
|
|||
p.ScalarAutoIndexParams = ParamItem{
|
||||
Key: "scalarAutoIndex.params.build",
|
||||
Version: "2.4.0",
|
||||
DefaultValue: `{"int": "HYBRID","varchar": "HYBRID","bool": "BITMAP", "float": "INVERTED"}`,
|
||||
DefaultValue: `{"int": "INVERTED", "float": "INVERTED", "varchar": "INVERTED", "bool": "BITMAP"}`,
|
||||
}
|
||||
p.ScalarAutoIndexParams.Init(base.mgr)
|
||||
|
||||
|
|
Loading…
Reference in New Issue