Documentation
¶
Index ¶
- Constants
- Variables
- func CheckIntByRange(params map[string]string, key string, min, max int) bool
- func CheckStrByValues(params map[string]string, key string, container []string) bool
- func IsDiskIndex(indexType IndexType) bool
- func IsGpuIndex(indexType IndexType) bool
- func IsHYBRIDChecker(checker interface{}) bool
- func IsMmapSupported(indexType IndexType) bool
- type AUTOINDEXChecker
- func (c *AUTOINDEXChecker) CheckTrain(params map[string]string) error
- func (c *AUTOINDEXChecker) CheckValidDataType(field *schemapb.FieldSchema) error
- func (c AUTOINDEXChecker) SetDefaultMetricTypeIfNotExist(m map[string]string, dType schemapb.DataType)
- func (c AUTOINDEXChecker) StaticCheck(params map[string]string) error
- type BITMAPChecker
- type HYBRIDChecker
- type INVERTEDChecker
- type IndexChecker
- type IndexCheckerMgr
- type IndexType
- type STLSORTChecker
- type TRIEChecker
Constants ¶
View Source
const ( MinNBits = 1 MaxNBits = 16 DefaultNBits = 8 // MinNList is the lower limit of nlist that used in Index IVFxxx MinNList = 1 // MaxNList is the upper limit of nlist that used in Index IVFxxx MaxNList = 65536 HNSWMinEfConstruction = 1 HNSWMaxEfConstruction = 2147483647 HNSWMinM = 1 HNSWMaxM = 2048 // DIM is a constant used to represent dimension DIM = common.DimKey // Metric is a constant used to metric type Metric = common.MetricTypeKey // NLIST is a constant used to nlist in Index IVFxxx NLIST = "nlist" NBITS = "nbits" IVFM = "m" EFConstruction = "efConstruction" HNSWM = "M" RaftCacheDatasetOnDevice = "cache_dataset_on_device" // Cagra Train Param CagraInterDegree = "intermediate_graph_degree" CagraGraphDegree = "graph_degree" CagraBuildAlgo = "build_algo" CargaBuildAlgoIVFPQ = "IVF_PQ" CargaBuildAlgoNNDESCENT = "NN_DESCENT" // Sparse Index Param SparseDropRatioBuild = "drop_ratio_build" MaxBitmapCardinalityLimit = 1000 )
Variables ¶
View Source
var ( FloatVectorMetrics = []string{metric.L2, metric.IP, metric.COSINE} // const BinaryVectorMetrics = []string{metric.HAMMING, metric.JACCARD, metric.SUBSTRUCTURE, metric.SUPERSTRUCTURE} // const )
View Source
var ( BinIDMapMetrics = []string{metric.HAMMING, metric.JACCARD, metric.SUBSTRUCTURE, metric.SUPERSTRUCTURE} // const BinIvfMetrics = []string{metric.HAMMING, metric.JACCARD} // const HnswMetrics = []string{metric.L2, metric.IP, metric.COSINE, metric.HAMMING, metric.JACCARD} // const RaftMetrics = []string{metric.L2, metric.IP} CagraBuildAlgoTypes = []string{CargaBuildAlgoIVFPQ, CargaBuildAlgoNNDESCENT} SparseMetrics = []string{metric.IP} // const )
BinIDMapMetrics is a set of all metric types supported for binary vector.
Functions ¶
func CheckIntByRange ¶
CheckIntByRange check if the data corresponding to the key is in the range of [min, max]. Return false if:
- the key does not exist, or
- the data cannot be converted to an integer, or
- the number is not in the range [min, max]
Return true otherwise
func CheckStrByValues ¶
CheckStrByValues check whether the data corresponding to the key appears in the string slice of container. Return false if:
- the key does not exist, or
- the data does not appear in the container
Return true otherwise
func IsDiskIndex ¶
func IsGpuIndex ¶
func IsHYBRIDChecker ¶
func IsHYBRIDChecker(checker interface{}) bool
func IsMmapSupported ¶
Types ¶
type AUTOINDEXChecker ¶
type AUTOINDEXChecker struct {
// contains filtered or unexported fields
}
AUTOINDEXChecker checks if a TRIE index can be built.
func (*AUTOINDEXChecker) CheckTrain ¶
func (c *AUTOINDEXChecker) CheckTrain(params map[string]string) error
func (*AUTOINDEXChecker) CheckValidDataType ¶
func (c *AUTOINDEXChecker) CheckValidDataType(field *schemapb.FieldSchema) error
func (AUTOINDEXChecker) SetDefaultMetricTypeIfNotExist ¶
func (AUTOINDEXChecker) StaticCheck ¶
type BITMAPChecker ¶
type BITMAPChecker struct {
// contains filtered or unexported fields
}
func (*BITMAPChecker) CheckTrain ¶
func (c *BITMAPChecker) CheckTrain(params map[string]string) error
func (*BITMAPChecker) CheckValidDataType ¶
func (c *BITMAPChecker) CheckValidDataType(field *schemapb.FieldSchema) error
type HYBRIDChecker ¶
type HYBRIDChecker struct {
// contains filtered or unexported fields
}
func (*HYBRIDChecker) CheckTrain ¶
func (c *HYBRIDChecker) CheckTrain(params map[string]string) error
func (*HYBRIDChecker) CheckValidDataType ¶
func (c *HYBRIDChecker) CheckValidDataType(field *schemapb.FieldSchema) error
type INVERTEDChecker ¶
type INVERTEDChecker struct {
// contains filtered or unexported fields
}
INVERTEDChecker checks if a INVERTED index can be built.
func (*INVERTEDChecker) CheckTrain ¶
func (c *INVERTEDChecker) CheckTrain(params map[string]string) error
func (*INVERTEDChecker) CheckValidDataType ¶
func (c *INVERTEDChecker) CheckValidDataType(field *schemapb.FieldSchema) error
type IndexChecker ¶
type IndexCheckerMgr ¶
type IndexCheckerMgr interface {
GetChecker(indexType string) (IndexChecker, error)
}
func GetIndexCheckerMgrInstance ¶
func GetIndexCheckerMgrInstance() IndexCheckerMgr
GetIndexCheckerMgrInstance gets the instance of IndexCheckerMgr.
type IndexType ¶
type IndexType = string
IndexType string.
const ( IndexGpuBF IndexType = "GPU_BRUTE_FORCE" IndexRaftIvfFlat IndexType = "GPU_IVF_FLAT" IndexRaftIvfPQ IndexType = "GPU_IVF_PQ" IndexRaftCagra IndexType = "GPU_CAGRA" IndexRaftBruteForce IndexType = "GPU_BRUTE_FORCE" IndexFaissIDMap IndexType = "FLAT" // no index is built. IndexFaissIvfFlat IndexType = "IVF_FLAT" IndexFaissIvfPQ IndexType = "IVF_PQ" IndexScaNN IndexType = "SCANN" IndexFaissIvfSQ8 IndexType = "IVF_SQ8" IndexFaissBinIDMap IndexType = "BIN_FLAT" IndexFaissBinIvfFlat IndexType = "BIN_IVF_FLAT" IndexHNSW IndexType = "HNSW" IndexDISKANN IndexType = "DISKANN" IndexSparseInverted IndexType = "SPARSE_INVERTED_INDEX" IndexSparseWand IndexType = "SPARSE_WAND" IndexINVERTED IndexType = "INVERTED" IndexSTLSORT IndexType = "STL_SORT" IndexTRIE IndexType = "TRIE" IndexTrie IndexType = "Trie" IndexBitmap IndexType = "BITMAP" IndexHybrid IndexType = "HYBRID" AutoIndex IndexType = "AUTOINDEX" )
IndexType definitions
type STLSORTChecker ¶
type STLSORTChecker struct {
// contains filtered or unexported fields
}
STLSORTChecker checks if a STL_SORT index can be built.
func (*STLSORTChecker) CheckTrain ¶
func (c *STLSORTChecker) CheckTrain(params map[string]string) error
func (*STLSORTChecker) CheckValidDataType ¶
func (c *STLSORTChecker) CheckValidDataType(field *schemapb.FieldSchema) error
type TRIEChecker ¶
type TRIEChecker struct {
// contains filtered or unexported fields
}
TRIEChecker checks if a TRIE index can be built.
func (*TRIEChecker) CheckTrain ¶
func (c *TRIEChecker) CheckTrain(params map[string]string) error
func (*TRIEChecker) CheckValidDataType ¶
func (c *TRIEChecker) CheckValidDataType(field *schemapb.FieldSchema) error
Source Files
¶
- auto_index_checker.go
- base_checker.go
- bin_flat_checker.go
- bin_ivf_flat_checker.go
- binary_vector_base_checker.go
- bitmap_index_checker.go
- cagra_checker.go
- conf_adapter_mgr.go
- constraints.go
- diskann_checker.go
- flat_checker.go
- float_vector_base_checker.go
- hnsw_checker.go
- hybrid_index_checker.go
- index_checker.go
- index_type.go
- inverted_checker.go
- ivf_base_checker.go
- ivf_pq_checker.go
- ivf_sq_checker.go
- raft_brute_force_checker.go
- raft_ivf_flat_checker.go
- raft_ivf_pq_checker.go
- scalar_index_checker.go
- scann_checker.go
- sparse_float_vector_base_checker.go
- sparse_inverted_index_checker.go
- stl_sort_checker.go
- trie_checker.go
- utils.go
Click to show internal directories.
Click to hide internal directories.