mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-01 03:18:29 +08:00
29ae1229b6
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
27 lines
605 B
Go
27 lines
605 B
Go
package indexparamcheck
|
|
|
|
type ivfBaseChecker struct {
|
|
floatVectorBaseChecker
|
|
}
|
|
|
|
func (c ivfBaseChecker) StaticCheck(params map[string]string) error {
|
|
if !CheckIntByRange(params, NLIST, MinNList, MaxNList) {
|
|
return errOutOfRange(NLIST, MinNList, MaxNList)
|
|
}
|
|
|
|
// skip check number of rows
|
|
|
|
return c.floatVectorBaseChecker.staticCheck(params)
|
|
}
|
|
|
|
func (c ivfBaseChecker) CheckTrain(params map[string]string) error {
|
|
if err := c.StaticCheck(params); err != nil {
|
|
return err
|
|
}
|
|
return c.floatVectorBaseChecker.CheckTrain(params)
|
|
}
|
|
|
|
func newIVFBaseChecker() IndexChecker {
|
|
return &ivfBaseChecker{}
|
|
}
|