mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-04 21:09:06 +08:00
18 lines
460 B
Go
18 lines
460 B
Go
|
package indexparamcheck
|
||
|
|
||
|
// diskannChecker checks if an diskann index can be built.
|
||
|
type diskannChecker struct {
|
||
|
floatVectorBaseChecker
|
||
|
}
|
||
|
|
||
|
func (c *diskannChecker) CheckTrain(params map[string]string) error {
|
||
|
if !CheckIntByRange(params, DIM, DiskAnnMinDim, DefaultMaxDim) {
|
||
|
return errOutOfRange(DIM, DiskAnnMinDim, DefaultMaxDim)
|
||
|
}
|
||
|
return c.floatVectorBaseChecker.CheckTrain(params)
|
||
|
}
|
||
|
|
||
|
func newDiskannChecker() IndexChecker {
|
||
|
return &diskannChecker{}
|
||
|
}
|