milvus/pkg/util/indexparamcheck/diskann_checker.go
Jiquan Long 29ae1229b6
Support AutoIndex (#24387)
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
2023-05-29 20:35:28 +08:00

22 lines
540 B
Go

package indexparamcheck
// diskannChecker checks if an diskann index can be built.
type diskannChecker struct {
floatVectorBaseChecker
}
func (c diskannChecker) StaticCheck(params map[string]string) error {
return c.staticCheck(params)
}
func (c diskannChecker) CheckTrain(params map[string]string) error {
if !CheckIntByRange(params, DIM, DiskAnnMinDim, DefaultMaxDim) {
return errOutOfRange(DIM, DiskAnnMinDim, DefaultMaxDim)
}
return c.StaticCheck(params)
}
func newDiskannChecker() IndexChecker {
return &diskannChecker{}
}