Documentation
¶
Index ¶
- Constants
- func IsMetadataFile(name string) bool
- func MetadataFileName(targetVector string) string
- func ParseAndValidateConfig(input interface{}) (schemaConfig.VectorIndexConfig, error)
- func ParseDefaultQuantization(vectorIndexConfig schemaConfig.VectorIndexConfig, compression string) (schemaConfig.VectorIndexConfig, error)
- type CompressionUserConfig
- type RQUserConfig
- type UserConfig
Constants ¶
const ( DefaultVectorCache = false DefaultVectorCacheMaxObjects = 1e12 DefaultCompressionEnabled = false DefaultCompressionRescore = -1 // indicates "let Weaviate pick" DefaultRQBits = 8 )
Variables ¶
This section is empty.
Functions ¶
func IsMetadataFile ¶ added in v1.38.12
IsMetadataFile reports whether the base name of name matches the flat metadata naming rule. name may be a base name or a path. entities/backup cannot import adapters/repos/db/vector/flat, so the predicate is defined here.
func MetadataFileName ¶ added in v1.38.12
MetadataFileName returns the name of the bolt file a flat index keeps its metadata in, inside the index's own root directory. Clean and Base reduce targetVector to one path element; the degenerate results they can still return get the unnamed vector's name rather than a separator in a filename.
func ParseAndValidateConfig ¶
func ParseAndValidateConfig(input interface{}) (schemaConfig.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 ParseDefaultQuantization ¶ added in v1.35.0
func ParseDefaultQuantization(vectorIndexConfig schemaConfig.VectorIndexConfig, compression string) (schemaConfig.VectorIndexConfig, error)
Types ¶
type CompressionUserConfig ¶
type RQUserConfig ¶ added in v1.34.0
type UserConfig ¶
type UserConfig struct {
Distance string `json:"distance"`
VectorCacheMaxObjects int `json:"vectorCacheMaxObjects"`
PQ CompressionUserConfig `json:"pq"`
BQ CompressionUserConfig `json:"bq"`
SQ CompressionUserConfig `json:"sq"`
RQ RQUserConfig `json:"rq"`
SkipDefaultQuantization bool `json:"skipDefaultQuantization"`
TrackDefaultQuantization bool `json:"trackDefaultQuantization"`
}
func NewDefaultUserConfig ¶
func NewDefaultUserConfig() UserConfig
func (UserConfig) DistanceName ¶
func (u UserConfig) DistanceName() string
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) IsMultiVector ¶ added in v1.29.0
func (u UserConfig) IsMultiVector() bool
func (*UserConfig) SetDefaults ¶
func (u *UserConfig) SetDefaults()
SetDefaults in the user-specifyable part of the config