Documentation ¶
Index ¶
Constants ¶
View Source
const ( DistanceCosine = "cosine" DistanceDot = "dot" DistanceL2Squared = "l2-squared" DistanceManhattan = "manhattan" DistanceHamming = "hamming" )
View Source
const ( // Set these defaults if the user leaves them blank DefaultCleanupIntervalSeconds = 5 * 60 DefaultMaxConnections = 64 DefaultEFConstruction = 128 DefaultEF = -1 // indicates "let Weaviate pick" DefaultDynamicEFMin = 100 DefaultDynamicEFMax = 500 DefaultDynamicEFFactor = 8 DefaultVectorCacheMaxObjects = 1e12 DefaultSkip = false DefaultFlatSearchCutoff = 40000 DefaultDistanceMetric = DistanceCosine // Fail validation if those criteria are not met MinmumMaxConnections = 4 MinmumEFConstruction = 4 )
View Source
const ( PQEncoderTypeKMeans = "kmeans" PQEncoderTypeTile = "tile" PQEncoderDistributionLogNormal = "log-normal" PQEncoderDistributionNormal = "normal" )
View Source
const ( DefaultPQEnabled = false DefaultPQBitCompression = false DefaultPQSegments = 0 DefaultPQEncoderType = PQEncoderTypeKMeans DefaultPQEncoderDistribution = PQEncoderDistributionLogNormal DefaultPQCentroids = 256 DefaultPQTrainingLimit = 100000 )
Variables ¶
This section is empty.
Functions ¶
func ParseAndValidateConfig ¶ added in v1.17.5
func ParseAndValidateConfig(input interface{}) (schema.VectorIndexConfig, error)
ParseAndValidateConfig from an unknown input value, as this is not further specified in the API to allow of exchanging the index type
func ValidatePQConfig ¶ added in v1.20.0
Types ¶
type PQConfig ¶ added in v1.18.0
type PQConfig struct { Enabled bool `json:"enabled"` BitCompression bool `json:"bitCompression"` Segments int `json:"segments"` Centroids int `json:"centroids"` TrainingLimit int `json:"trainingLimit"` Encoder PQEncoder `json:"encoder"` }
Product Quantization configuration
type PQEncoder ¶ added in v1.18.0
type PQEncoder struct { Type string `json:"type"` Distribution string `json:"distribution,omitempty"` }
Product Quantization encoder configuration
type UserConfig ¶
type UserConfig struct { Skip bool `json:"skip"` CleanupIntervalSeconds int `json:"cleanupIntervalSeconds"` MaxConnections int `json:"maxConnections"` EFConstruction int `json:"efConstruction"` EF int `json:"ef"` DynamicEFMin int `json:"dynamicEfMin"` DynamicEFMax int `json:"dynamicEfMax"` DynamicEFFactor int `json:"dynamicEfFactor"` VectorCacheMaxObjects int `json:"vectorCacheMaxObjects"` FlatSearchCutoff int `json:"flatSearchCutoff"` Distance string `json:"distance"` PQ PQConfig `json:"pq"` }
UserConfig bundles all values settable by a user in the per-class settings
func NewDefaultUserConfig ¶
func NewDefaultUserConfig() UserConfig
func (UserConfig) IndexType ¶
func (u UserConfig) IndexType() string
IndexType returns the type of the underlying vector index, thus making sure the schema.VectorIndexConfig interface is implemented
func (*UserConfig) SetDefaults ¶
func (u *UserConfig) SetDefaults()
SetDefaults in the user-specifyable part of the config
Click to show internal directories.
Click to hide internal directories.