diff --git a/entity/genidx/genidx.go b/entity/genidx/genidx.go index 2f997bea..b99dad7d 100644 --- a/entity/genidx/genidx.go +++ b/entity/genidx/genidx.go @@ -710,7 +710,7 @@ func main() { }, { IdxName: "SCANN", - IdxType: entity.IvfFlat, + IdxType: entity.SCANN, ConstructParams: []idxParam{ { Name: "nlist", diff --git a/entity/indexes_gen.go b/entity/indexes_gen.go index 0604c5b3..e4b84fe5 100755 --- a/entity/indexes_gen.go +++ b/entity/indexes_gen.go @@ -727,7 +727,7 @@ func NewIndexGPUIvfPQ(metricType MetricType, var _ Index = &IndexSCANN{} -// IndexSCANN idx type for IVF_FLAT +// IndexSCANN idx type for SCANN type IndexSCANN struct { //auto generated fields nlist int with_raw_data bool @@ -741,7 +741,7 @@ func(i *IndexSCANN) Name() string { // IndexType returns IndexType, implementing Index interface func(i *IndexSCANN) IndexType() IndexType { - return IndexType("IVF_FLAT") + return IndexType("SCANN") } // SupportBinary returns whether index type support binary vector diff --git a/entity/indexes_gen_test.go b/entity/indexes_gen_test.go index cec8afb7..e7fce9fc 100755 --- a/entity/indexes_gen_test.go +++ b/entity/indexes_gen_test.go @@ -588,7 +588,7 @@ func TestIndexSCANN(t *testing.T){ assert.Nil(t, err) assert.NotNil(t, idx0) assert.Equal(t, "SCANN", idx0.Name()) - assert.EqualValues(t, "IVF_FLAT", idx0.IndexType()) + assert.EqualValues(t, "SCANN", idx0.IndexType()) assert.NotNil(t, idx0.Params()) assert.False(t, idx0.SupportBinary()) @@ -600,7 +600,7 @@ func TestIndexSCANN(t *testing.T){ assert.Nil(t, err) assert.NotNil(t, idx1) assert.Equal(t, "SCANN", idx1.Name()) - assert.EqualValues(t, "IVF_FLAT", idx1.IndexType()) + assert.EqualValues(t, "SCANN", idx1.IndexType()) assert.NotNil(t, idx1.Params()) assert.False(t, idx1.SupportBinary()) diff --git a/entity/indexes_search_param_gen.go b/entity/indexes_search_param_gen.go index a5a8148c..1a8b6b23 100755 --- a/entity/indexes_search_param_gen.go +++ b/entity/indexes_search_param_gen.go @@ -382,7 +382,7 @@ func NewIndexGPUIvfPQSearchParam( var _ SearchParam = &IndexSCANNSearchParam{} -// IndexSCANNSearchParam search param struct for index type IVF_FLAT +// IndexSCANNSearchParam search param struct for index type SCANN type IndexSCANNSearchParam struct { //auto generated fields baseSearchParams