mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
29ae1229b6
Signed-off-by: longjiquan <jiquan.long@zilliz.com>
22 lines
540 B
Go
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{}
|
|
}
|