func(i *IndexIvfSQ8H) Params() map[string]string {
	params := map[string]string { 
		"nlist": fmt.Sprintf("%v",i.nlist),
	}
	bs, _ := json.Marshal(params)
	return map[string]string {
		"params": string(bs),
		"index_type": string(i.IndexType()),
		"metric_type": string(i.metricType),
	}
}
Params returns index construction params, implementing Index interface
package entity
import (
	"errors"
	"encoding/json"
	"fmt"
)
var _ Index = &IndexFlat{}
type IndexFlat struct {  
	nlist int
	metricType MetricType
}
func(i *IndexFlat) Name() string {
	return "Flat"
}
func(i *IndexFlat) IndexType() IndexType {
	return IndexType("FLAT")
}
func(i *IndexFlat) SupportBinary() bool {
	return 0 & 2 > 0
}
func(i *IndexFlat) Params() map[string]string {
	params := map[string]string { 
		"nlist": fmt.Sprintf("%v",i.nlist),
	}
	bs, _ := json.Marshal(params)
	return map[string]string {
		"params": string(bs),
		"index_type": string(i.IndexType()),
		"metric_type": string(i.metricType),
	}
}
func NewIndexFlat(metricType MetricType, 
	nlist int,
) (*IndexFlat, error) {
	if nlist < 1 {
		return nil, errors.New("nlist not valid")
	}
	if nlist > 65536 {
		return nil, errors.New("nlist not valid")
	}
	return &IndexFlat{ 
	nlist: nlist,
	metricType: metricType,
	}, nil
}
var _ Index = &IndexBinFlat{}
type IndexBinFlat struct {  
	nlist int
	metricType MetricType
}
func(i *IndexBinFlat) Name() string {
	return "BinFlat"
}
func(i *IndexBinFlat) IndexType() IndexType {
	return IndexType("BIN_FLAT")
}
func(i *IndexBinFlat) SupportBinary() bool {
	return 2 & 2 > 0
}
func(i *IndexBinFlat) Params() map[string]string {
	params := map[string]string { 
		"nlist": fmt.Sprintf("%v",i.nlist),
	}
	bs, _ := json.Marshal(params)
	return map[string]string {
		"params": string(bs),
		"index_type": string(i.IndexType()),
		"metric_type": string(i.metricType),
	}
}
func NewIndexBinFlat(metricType MetricType, 
	nlist int,
) (*IndexBinFlat, error) {
	if nlist < 1 {
		return nil, errors.New("nlist not valid")
	}
	if nlist > 65536 {
		return nil, errors.New("nlist not valid")
	}
	return &IndexBinFlat{ 
	nlist: nlist,
	metricType: metricType,
	}, nil
}
var _ Index = &IndexIvfFlat{}
type IndexIvfFlat struct {  
	nlist int
	metricType MetricType
}
func(i *IndexIvfFlat) Name() string {
	return "IvfFlat"
}
func(i *IndexIvfFlat) IndexType() IndexType {
	return IndexType("IVF_FLAT")
}
func(i *IndexIvfFlat) SupportBinary() bool {
	return 0 & 2 > 0
}
func(i *IndexIvfFlat) Params() map[string]string {
	params := map[string]string { 
		"nlist": fmt.Sprintf("%v",i.nlist),
	}
	bs, _ := json.Marshal(params)
	return map[string]string {
		"params": string(bs),
		"index_type": string(i.IndexType()),
		"metric_type": string(i.metricType),
	}
}
func NewIndexIvfFlat(metricType MetricType, 
	nlist int,
) (*IndexIvfFlat, error) {
	if nlist < 1 {
		return nil, errors.New("nlist not valid")
	}
	if nlist > 65536 {
		return nil, errors.New("nlist not valid")
	}
	return &IndexIvfFlat{ 
	nlist: nlist,
	metricType: metricType,
	}, nil
}
var _ Index = &IndexBinIvfFlat{}
type IndexBinIvfFlat struct {  
	nlist int
	metricType MetricType
}
func(i *IndexBinIvfFlat) Name() string {
	return "BinIvfFlat"
}
func(i *IndexBinIvfFlat) IndexType() IndexType {
	return IndexType("BIN_IVF_FLAT")
}
func(i *IndexBinIvfFlat) SupportBinary() bool {
	return 2 & 2 > 0
}
func(i *IndexBinIvfFlat) Params() map[string]string {
	params := map[string]string { 
		"nlist": fmt.Sprintf("%v",i.nlist),
	}
	bs, _ := json.Marshal(params)
	return map[string]string {
		"params": string(bs),
		"index_type": string(i.IndexType()),
		"metric_type": string(i.metricType),
	}
}
func NewIndexBinIvfFlat(metricType MetricType, 
	nlist int,
) (*IndexBinIvfFlat, error) {
	if nlist < 1 {
		return nil, errors.New("nlist not valid")
	}
	if nlist > 65536 {
		return nil, errors.New("nlist not valid")
	}
	return &IndexBinIvfFlat{ 
	nlist: nlist,
	metricType: metricType,
	}, nil
}
var _ Index = &IndexIvfSQ8{}
type IndexIvfSQ8 struct {  
	nlist int
	metricType MetricType
}
func(i *IndexIvfSQ8) Name() string {
	return "IvfSQ8"
}
func(i *IndexIvfSQ8) IndexType() IndexType {
	return IndexType("IVF_SQ8")
}
func(i *IndexIvfSQ8) SupportBinary() bool {
	return 0 & 2 > 0
}
func(i *IndexIvfSQ8) Params() map[string]string {
	params := map[string]string { 
		"nlist": fmt.Sprintf("%v",i.nlist),
	}
	bs, _ := json.Marshal(params)
	return map[string]string {
		"params": string(bs),
		"index_type": string(i.IndexType()),
		"metric_type": string(i.metricType),
	}
}
func NewIndexIvfSQ8(metricType MetricType, 
	nlist int,
) (*IndexIvfSQ8, error) {
	if nlist < 1 {
		return nil, errors.New("nlist not valid")
	}
	if nlist > 65536 {
		return nil, errors.New("nlist not valid")
	}
	return &IndexIvfSQ8{ 
	nlist: nlist,
	metricType: metricType,
	}, nil
}
var _ Index = &IndexIvfSQ8H{}
type IndexIvfSQ8H struct {  
	nlist int
	metricType MetricType
}
func(i *IndexIvfSQ8H) Name() string {
	return "IvfSQ8H"
}
func(i *IndexIvfSQ8H) IndexType() IndexType {
	return IndexType("IVF_SQ8_HYBRID")
}
func(i *IndexIvfSQ8H) SupportBinary() bool {
	return 0 & 2 > 0
}