config

package
v1.31.21 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2025 License: BSD-3-Clause Imports: 30 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// These BM25 tuning params can be overwritten on a per-class basis
	DefaultBM25k1 = float32(1.2)
	DefaultBM25b  = float32(0.75)
)
View Source
const (
	DefaultMaxImportGoroutinesFactor = float64(1.5)

	DefaultDiskUseWarningPercentage  = uint64(80)
	DefaultDiskUseReadonlyPercentage = uint64(90)
	DefaultMemUseWarningPercentage   = uint64(80)
	// TODO: off by default for now, to make sure
	//       the measurement is reliable. once
	//       confirmed, we can set this to 90
	DefaultMemUseReadonlyPercentage = uint64(0)
)
View Source
const (
	DefaultQueryDefaultsLimit        int64 = 10
	DefaultQueryDefaultsLimitGraphQL int64 = 100
)

DefaultQueryDefaultsLimit is the default query limit when no limit is provided

View Source
const (
	// minimal interval for new hnws snapshot to be created after last one
	DefaultHNSWSnapshotIntervalSeconds                  = 6 * 3600 // 6h
	DefaultHNSWSnapshotDisabled                         = true
	DefaultHNSWSnapshotOnStartup                        = true
	DefaultHNSWSnapshotMinDeltaCommitlogsNumber         = 1
	DefaultHNSWSnapshotMinDeltaCommitlogsSizePercentage = 5 // 5%
)
View Source
const (
	DefaultReindexerGoroutinesFactor = 0.5

	DefaultMapToBlockmaxProcessingDurationSeconds  = 3 * 60
	DefaultMapToBlockmaxPauseDurationSeconds       = 60
	DefaultMapToBlockmaxPerObjectDelayMilliseconds = 0
)
View Source
const (
	DefaultMetadataServerGrpcListenAddress         = ":9050"
	DefaultMetadataServerDataEventsChannelCapacity = 100
)
View Source
const (
	DefaultPersistenceMinMMapSize     = 8192 // 8kb by default
	DefaultPersistenceMaxReuseWalSize = 4096 // 4kb by default
)
View Source
const (
	DefaultCORSAllowOrigin  = "*"
	DefaultCORSAllowMethods = "*"
	DefaultCORSAllowHeaders = "" /* 802-byte string literal not displayed */
)
View Source
const (
	DefaultRaftPort         = 8300
	DefaultRaftInternalPort = 8301
	DefaultRaftGRPCMaxSize  = 1024 * 1024 * 1024
	// DefaultRaftBootstrapTimeout is the time raft will wait to bootstrap or rejoin the cluster on a restart. We set it
	// to 600 because if we're loading a large DB we need to wait for it to load before being able to join the cluster
	// on a single node cluster.
	DefaultRaftBootstrapTimeout = 600
	DefaultRaftBootstrapExpect  = 1
	DefaultRaftDir              = "raft"
	DefaultHNSWAcornFilterRatio = 0.4

	DefaultRuntimeOverridesLoadInterval = 2 * time.Minute

	DefaultDistributedTasksSchedulerTickInterval = time.Minute
	DefaultDistributedTasksCompletedTaskTTL      = 5 * 24 * time.Hour

	DefaultReplicationEngineMaxWorkers     = 10
	DefaultReplicaMovementMinimumAsyncWait = 60 * time.Second

	DefaultTransferInactivityTimeout = 5 * time.Minute

	DefaultTrackVectorDimensionsInterval = 5 * time.Minute
)
View Source
const (
	DefaultQueryMaximumResults       = int64(10000)
	DefaultQueryHybridMaximumResults = int64(100)
	// DefaultQueryNestedCrossReferenceLimit describes the max number of nested crossrefs returned for a query
	DefaultQueryNestedCrossReferenceLimit = int64(100000)
	// DefaultQueryCrossReferenceDepthLimit describes the max depth of nested crossrefs in a query
	DefaultQueryCrossReferenceDepthLimit = 5

	DefaultQueryBitmapBufsMaxBufSize = 1 << 25 // 32MB
	DefaultQueryBitmapBufsMaxMemory  = 1 << 27 // 128MB (2x 32MB, 2x 16MB, 2x 8MB, 2x 4MB, 4x 2MB)
)
View Source
const (
	DefaultPersistenceMemtablesFlushDirtyAfter = 60
	DefaultPersistenceMemtablesMaxSize         = 200
	DefaultPersistenceMemtablesMinDuration     = 15
	DefaultPersistenceMemtablesMaxDuration     = 45
	DefaultMaxConcurrentGetRequests            = 0
	DefaultMaxConcurrentShardLoads             = 500
	DefaultGRPCPort                            = 50051
	DefaultGRPCMaxMsgSize                      = 104858000 // 100 * 1024 * 1024 + 400
	DefaultMinimumReplicationFactor            = 1
	DefaultMaximumAllowedCollectionsCount      = -1 // unlimited
)
View Source
const DefaultCleanupIntervalSeconds = int64(60)

DefaultCleanupIntervalSeconds can be overwritten on a per-class basis

View Source
const DefaultConfigFile string = "./weaviate.conf.json"

DefaultConfigFile is the default file when no config file is provided

View Source
const DefaultGossipBindPort = 7946

DefaultGossipBindPort uses the hashicorp/memberlist default port value assigned with the use of DefaultLocalConfig

View Source
const DefaultHNSWFlatSearchConcurrency = 1 // 1 for backward compatibility
View Source
const DefaultHNSWVisitedListPoolSize = -1 // unlimited for backward compatibility
View Source
const DefaultPersistenceDataPath string = "./data"

DefaultPersistenceDataPath is the default location for data directory when no location is provided

View Source
const DefaultPersistenceHNSWMaxLogSize = 500 * 1024 * 1024 // 500MB for backward compatibility
View Source
const DefaultPersistenceLSMCycleManagerRoutinesFactor = 2

DefaultPersistenceLSMCycleManagerRoutinesFactor - determines how many goroutines are started for cyclemanager (factor * NUMCPU)

View Source
const DefaultPersistenceLSMMaxSegmentSize = math.MaxInt64

DefaultPersistenceLSMMaxSegmentSize is effectively unlimited for backward compatibility. TODO: consider changing this in a future release and make some noise about it. This is technically a breaking change.

View Source
const DefaultPersistenceLSMSegmentsCleanupIntervalSeconds = 0

DefaultPersistenceLSMSegmentsCleanupIntervalSeconds = 0 for backward compatibility. value = 0 means cleanup is turned off.

View Source
const VectorizerModuleNone = "none"
View Source
const VectorizerModuleText2VecContextionary = "text2vec-contextionary"

TODO: This should be retrieved dynamically from all installed modules

Variables

View Source
var DefaultAuthentication = Authentication{
	AnonymousAccess: AnonymousAccess{
		Enabled: true,
	},
}

DefaultAuthentication is the default authentication scheme when no authentication is provided

View Source
var DefaultUsingBlockMaxWAND = os.Getenv("USE_INVERTED_SEARCHABLE") == "" || entcfg.Enabled(os.Getenv("USE_INVERTED_SEARCHABLE"))
View Source
var ServerVersion string

ServerVersion is deprecated. Use `build.Version`. It's there for backward compatiblility. ServerVersion is set when the misc handlers are setup. When misc handlers are setup, the entire swagger spec is already being parsed for the server version. This is a good time for us to set ServerVersion, so that the spec only needs to be parsed once.

Functions

func FromEnv

func FromEnv(config *Config) error

FromEnv takes a *Config as it will respect initial config that has been provided by other means (e.g. a config file) and will only extend those that are set

func GetConfigOptionGroup

func GetConfigOptionGroup() *swag.CommandLineOptionsGroup

GetConfigOptionGroup creates an option group for swagger

func UpdateRuntimeConfig added in v1.30.2

func UpdateRuntimeConfig(log logrus.FieldLogger, source, parsed *WeaviateRuntimeConfig, hooks map[string]func() error) error

UpdateConfig does in-place update of `source` config based on values available in `parsed` config.

Types

type AnonymousAccess

type AnonymousAccess struct {
	Enabled bool `json:"enabled" yaml:"enabled"`
}

AnonymousAccess considers users without any auth information as authenticated as "anonymous" rather than denying their request immediately. Note that enabling anonymous access ONLY affects Authentication, not Authorization.

type Authentication

type Authentication struct {
	OIDC            OIDC            `json:"oidc" yaml:"oidc"`
	AnonymousAccess AnonymousAccess `json:"anonymous_access" yaml:"anonymous_access"`
	APIKey          StaticAPIKey    // don't change name to not break yaml files
	DBUsers         DbUsers         `json:"db_users" yaml:"db_users"`
}

Authentication configuration

func (Authentication) AnyApiKeyAvailable added in v1.30.0

func (a Authentication) AnyApiKeyAvailable() bool

func (Authentication) AnyAuthMethodSelected added in v1.24.0

func (a Authentication) AnyAuthMethodSelected() bool

func (Authentication) Validate

func (a Authentication) Validate() error

Validate the Authentication configuration. This only validates at a general level. Validation specific to the individual auth methods should happen inside their respective packages

type Authorization

type Authorization struct {
	AdminList adminlist.Config `json:"admin_list" yaml:"admin_list"`
	Rbac      rbacconf.Config  `json:"rbac" yaml:"rbac"`
}

Authorization configuration

func (Authorization) Validate

func (a Authorization) Validate() error

Validate the Authorization configuration. This only validates at a general level. Validation specific to the individual auth methods should happen inside their respective packages

type AutoSchema

type AutoSchema struct {
	Enabled       *runtime.DynamicValue[bool] `json:"enabled" yaml:"enabled"`
	DefaultString string                      `json:"defaultString" yaml:"defaultString"`
	DefaultNumber string                      `json:"defaultNumber" yaml:"defaultNumber"`
	DefaultDate   string                      `json:"defaultDate" yaml:"defaultDate"`
}

func (AutoSchema) Validate

func (a AutoSchema) Validate() error

type CORS added in v1.21.6

type CORS struct {
	AllowOrigin  string `json:"allow_origin" yaml:"allow_origin"`
	AllowMethods string `json:"allow_methods" yaml:"allow_methods"`
	AllowHeaders string `json:"allow_headers" yaml:"allow_headers"`
}

type CollectionPropsTenants added in v1.30.1

type CollectionPropsTenants struct {
	Collection string   `json:"collection" yaml:"collection"`
	Props      []string `json:"props" yaml:"props"`
	Tenants    []string `json:"tenants" yaml:"tenants"`
}

type Config

type Config struct {
	Name                                string                   `json:"name" yaml:"name"`
	Debug                               bool                     `json:"debug" yaml:"debug"`
	QueryDefaults                       QueryDefaults            `json:"query_defaults" yaml:"query_defaults"`
	QueryMaximumResults                 int64                    `json:"query_maximum_results" yaml:"query_maximum_results"`
	QueryHybridMaximumResults           int64                    `json:"query_hybrid_maximum_results" yaml:"query_hybrid_maximum_results"`
	QueryNestedCrossReferenceLimit      int64                    `json:"query_nested_cross_reference_limit" yaml:"query_nested_cross_reference_limit"`
	QueryCrossReferenceDepthLimit       int                      `json:"query_cross_reference_depth_limit" yaml:"query_cross_reference_depth_limit"`
	Contextionary                       Contextionary            `json:"contextionary" yaml:"contextionary"`
	Authentication                      Authentication           `json:"authentication" yaml:"authentication"`
	Authorization                       Authorization            `json:"authorization" yaml:"authorization"`
	Origin                              string                   `json:"origin" yaml:"origin"`
	Persistence                         Persistence              `json:"persistence" yaml:"persistence"`
	DefaultVectorizerModule             string                   `json:"default_vectorizer_module" yaml:"default_vectorizer_module"`
	DefaultVectorDistanceMetric         string                   `json:"default_vector_distance_metric" yaml:"default_vector_distance_metric"`
	EnableModules                       string                   `json:"enable_modules" yaml:"enable_modules"`
	EnableApiBasedModules               bool                     `json:"enable_api_based_modules" yaml:"enable_api_based_modules"`
	ModulesPath                         string                   `json:"modules_path" yaml:"modules_path"`
	ModuleHttpClientTimeout             time.Duration            `json:"modules_client_timeout" yaml:"modules_client_timeout"`
	AutoSchema                          AutoSchema               `json:"auto_schema" yaml:"auto_schema"`
	Cluster                             cluster.Config           `json:"cluster" yaml:"cluster"`
	Replication                         replication.GlobalConfig `json:"replication" yaml:"replication"`
	Monitoring                          monitoring.Config        `json:"monitoring" yaml:"monitoring"`
	GRPC                                GRPC                     `json:"grpc" yaml:"grpc"`
	Profiling                           Profiling                `json:"profiling" yaml:"profiling"`
	ResourceUsage                       ResourceUsage            `json:"resource_usage" yaml:"resource_usage"`
	MaxImportGoroutinesFactor           float64                  `json:"max_import_goroutine_factor" yaml:"max_import_goroutine_factor"`
	MaximumConcurrentGetRequests        int                      `json:"maximum_concurrent_get_requests" yaml:"maximum_concurrent_get_requests"`
	MaximumConcurrentShardLoads         int                      `json:"maximum_concurrent_shard_loads" yaml:"maximum_concurrent_shard_loads"`
	TrackVectorDimensions               bool                     `json:"track_vector_dimensions" yaml:"track_vector_dimensions"`
	TrackVectorDimensionsInterval       time.Duration            `json:"track_vector_dimensions_interval" yaml:"track_vector_dimensions_interval"`
	ReindexVectorDimensionsAtStartup    bool                     `json:"reindex_vector_dimensions_at_startup" yaml:"reindex_vector_dimensions_at_startup"`
	DisableLazyLoadShards               bool                     `json:"disable_lazy_load_shards" yaml:"disable_lazy_load_shards"`
	ForceFullReplicasSearch             bool                     `json:"force_full_replicas_search" yaml:"force_full_replicas_search"`
	TransferInactivityTimeout           time.Duration            `json:"transfer_inactivity_timeout" yaml:"transfer_inactivity_timeout"`
	RecountPropertiesAtStartup          bool                     `json:"recount_properties_at_startup" yaml:"recount_properties_at_startup"`
	ReindexSetToRoaringsetAtStartup     bool                     `json:"reindex_set_to_roaringset_at_startup" yaml:"reindex_set_to_roaringset_at_startup"`
	ReindexerGoroutinesFactor           float64                  `json:"reindexer_goroutines_factor" yaml:"reindexer_goroutines_factor"`
	ReindexMapToBlockmaxAtStartup       bool                     `json:"reindex_map_to_blockmax_at_startup" yaml:"reindex_map_to_blockmax_at_startup"`
	ReindexMapToBlockmaxConfig          MapToBlockamaxConfig     `json:"reindex_map_to_blockmax_config" yaml:"reindex_map_to_blockmax_config"`
	IndexMissingTextFilterableAtStartup bool                     `json:"index_missing_text_filterable_at_startup" yaml:"index_missing_text_filterable_at_startup"`
	DisableGraphQL                      bool                     `json:"disable_graphql" yaml:"disable_graphql"`
	AvoidMmap                           bool                     `json:"avoid_mmap" yaml:"avoid_mmap"`
	CORS                                CORS                     `json:"cors" yaml:"cors"`
	DisableTelemetry                    bool                     `json:"disable_telemetry" yaml:"disable_telemetry"`
	HNSWStartupWaitForVectorCache       bool                     `json:"hnsw_startup_wait_for_vector_cache" yaml:"hnsw_startup_wait_for_vector_cache"`
	HNSWVisitedListPoolMaxSize          int                      `json:"hnsw_visited_list_pool_max_size" yaml:"hnsw_visited_list_pool_max_size"`
	HNSWFlatSearchConcurrency           int                      `json:"hnsw_flat_search_concurrency" yaml:"hnsw_flat_search_concurrency"`
	HNSWAcornFilterRatio                float64                  `json:"hnsw_acorn_filter_ratio" yaml:"hnsw_acorn_filter_ratio"`
	HNSWGeoIndexEF                      int                      `json:"hnsw_geo_index_ef" yaml:"hnsw_geo_index_ef"`
	Sentry                              *entsentry.ConfigOpts    `json:"sentry" yaml:"sentry"`
	MetadataServer                      MetadataServer           `json:"metadata_server" yaml:"metadata_server"`
	SchemaHandlerConfig                 SchemaHandlerConfig      `json:"schema" yaml:"schema"`
	DistributedTasks                    DistributedTasksConfig   `json:"distributed_tasks" yaml:"distributed_tasks"`
	ReplicationEngineMaxWorkers         int                      `json:"replication_engine_max_workers" yaml:"replication_engine_max_workers"`
	// Raft Specific configuration
	// TODO-RAFT: Do we want to be able to specify these with config file as well ?
	Raft Raft

	// map[className][]propertyName
	ReindexIndexesAtStartup map[string][]string `json:"reindex_indexes_at_startup" yaml:"reindex_indexes_at_startup"`

	RuntimeOverrides RuntimeOverrides `json:"runtime_overrides" yaml:"runtime_overrides"`

	ReplicaMovementEnabled          bool                                 `json:"replica_movement_enabled" yaml:"replica_movement_enabled"`
	ReplicaMovementMinimumAsyncWait *runtime.DynamicValue[time.Duration] `json:"REPLICA_MOVEMENT_MINIMUM_ASYNC_WAIT" yaml:"REPLICA_MOVEMENT_MINIMUM_ASYNC_WAIT"`

	// TenantActivityReadLogLevel is 'debug' by default as every single READ
	// interaction with a tenant leads to a log line. However, this may
	// temporarily be desired, e.g. for analysis or debugging purposes. In this
	// case the log level can be elevated, e.g. to 'info'. This is overall less
	// noisy than changing the global log level, but still allows to see all
	// tenant read activity.
	TenantActivityReadLogLevel *runtime.DynamicValue[string] `json:"tenant_activity_read_log_level" yaml:"tenant_activity_read_log_level"`
	// TenantActivityWriteLogLevel is 'debug' by default as every single WRITE
	// interaction with a tenant leads to a log line. However, this may
	// temporarily be desired, e.g. for analysis or debugging purposes. In this
	// case the log level can be elevated, e.g. to 'info'. This is overall less
	// noisy than changing the global log level, but still allows to see all
	// tenant write activity.
	TenantActivityWriteLogLevel *runtime.DynamicValue[string] `json:"tenant_activity_write_log_level" yaml:"tenant_activity_write_log_level"`

	// RevectorizeCheck is an optimization where Weaviate checks if a vector can
	// be reused from a previous version of the object, for example because the
	// only change was an update of a property that is excluded from
	// vectorization. This check is on by default (backward-compatibility).
	//
	// However, this check comes at a cost, it means that every single insert
	// will turn into a read-before-write pattern, even if the inserted object is
	// new. That is because the logic first needs to check if the object even
	// exists. In cases where write throughput matters and the overwhelming
	// majority of inserts are new, unique objects, it might be advisable to turn
	// this feature off using the provided flag.
	RevectorizeCheckDisabled *runtime.DynamicValue[bool] `json:"revectorize_check_disabled" yaml:"revectorize_check_disabled"`

	QuerySlowLogEnabled   *runtime.DynamicValue[bool]          `json:"query_slow_log_enabled" yaml:"query_slow_log_enabled"`
	QuerySlowLogThreshold *runtime.DynamicValue[time.Duration] `json:"query_slow_log_threshold" yaml:"query_slow_log_threshold"`

	QueryBitmapBufsMaxMemory  int `json:"query_bitmap_bufs_max_memory" yaml:"query_bitmap_bufs_max_memory"`
	QueryBitmapBufsMaxBufSize int `json:"query_bitmap_bufs_max_buf_size" yaml:"query_bitmap_bufs_max_buf_size"`

	// InvertedSorterDisabled forces the "objects bucket" strategy and doesn't
	// not consider inverted sorting, even when the query planner thinks this is
	// the better option.
	//
	// Most users should never set this flag, it exists for two reasons:
	//  - For benchmarking reasons, this flag can be used to evaluate the
	//		(positive) impact of the inverted sorter.
	//  - As a safety net to revert to the old behavior in case there is a bug
	//		in the inverted indexer despite the very extensive testing.
	//
	// This flat may be removed in the future.
	InvertedSorterDisabled *runtime.DynamicValue[bool] `json:"inverted_sorter_disabled" yaml:"inverted_sorter_disabled"`
}

Config outline of the config file

func (*Config) Validate

func (c *Config) Validate() error

Validate the configuration

func (*Config) ValidateModules added in v1.28.3

func (c *Config) ValidateModules(modProv moduleProvider) error

ValidateModules validates the non-nested parameters. Nested objects must provide their own validation methods

type Contextionary

type Contextionary struct {
	URL string `json:"url" yaml:"url"`
}

type DbUsers added in v1.30.0

type DbUsers struct {
	Enabled bool `json:"enabled" yaml:"enabled"`
}

type DiskUse

type DiskUse struct {
	WarningPercentage  uint64 `json:"warning_percentage" yaml:"warning_percentage"`
	ReadOnlyPercentage uint64 `json:"readonly_percentage" yaml:"readonly_percentage"`
}

func (DiskUse) Validate

func (d DiskUse) Validate() error

type DistributedTasksConfig added in v1.31.0

type DistributedTasksConfig struct {
	Enabled               bool          `json:"enabled" yaml:"enabled"`
	CompletedTaskTTL      time.Duration `json:"completedTaskTTL" yaml:"completedTaskTTL"`
	SchedulerTickInterval time.Duration `json:"schedulerTickInterval" yaml:"schedulerTickInterval"`
}

type Flags

type Flags struct {
	ConfigFile string `long:"config-file" description:"path to config file (default: ./weaviate.conf.json)"`

	RaftPort               int      `long:"raft-port" description:"the port used by Raft for inter-node communication"`
	RaftInternalRPCPort    int      `long:"raft-internal-rpc-port" description:"the port used for internal RPCs within the cluster"`
	RaftRPCMessageMaxSize  int      `long:"raft-rpc-message-max-size" description:"maximum internal raft grpc message size in bytes, defaults to 1073741824"`
	RaftJoin               []string `` /* 240-byte string literal not displayed */
	RaftBootstrapTimeout   int      `` /* 148-byte string literal not displayed */
	RaftBootstrapExpect    int      `long:"raft-bootstrap-expect" description:"specifies the number of server nodes to wait for before bootstrapping the cluster"`
	RaftHeartbeatTimeout   int      `long:"raft-heartbeat-timeout" description:"raft heartbeat timeout"`
	RaftElectionTimeout    int      `long:"raft-election-timeout" description:"raft election timeout"`
	RaftSnapshotThreshold  int      `long:"raft-snap-threshold" description:"number of outstanding log entries before performing a snapshot"`
	RaftSnapshotInterval   int      `long:"raft-snap-interval" description:"controls how often raft checks if it should perform a snapshot"`
	RaftMetadataOnlyVoters bool     `` /* 130-byte string literal not displayed */

	RuntimeOverridesEnabled      bool          `long:"runtime-overrides.enabled" description:"enable runtime overrides config"`
	RuntimeOverridesPath         string        `long:"runtime-overrides.path" description:"path to runtime overrides config"`
	RuntimeOverridesLoadInterval time.Duration `long:"runtime-overrides.load-interval" description:"load interval for runtime overrides config"`
}

Flags are input options

type GRPC added in v1.19.0

type GRPC struct {
	Port       int    `json:"port" yaml:"port"`
	CertFile   string `json:"certFile" yaml:"certFile"`
	KeyFile    string `json:"keyFile" yaml:"keyFile"`
	MaxMsgSize int    `json:"maxMsgSize" yaml:"maxMsgSize"`
}

Support independent TLS credentials for gRPC

type MapToBlockamaxConfig added in v1.30.0

type MapToBlockamaxConfig struct {
	SwapBuckets                bool                     `json:"swap_buckets" yaml:"swap_buckets"`
	UnswapBuckets              bool                     `json:"unswap_buckets" yaml:"unswap_buckets"`
	TidyBuckets                bool                     `json:"tidy_buckets" yaml:"tidy_buckets"`
	ReloadShards               bool                     `json:"reload_shards" yaml:"reload_shards"`
	Rollback                   bool                     `json:"rollback" yaml:"rollback"`
	ConditionalStart           bool                     `json:"conditional_start" yaml:"conditional_start"`
	ProcessingDurationSeconds  int                      `json:"processing_duration_seconds" yaml:"processing_duration_seconds"`
	PauseDurationSeconds       int                      `json:"pause_duration_seconds" yaml:"pause_duration_seconds"`
	PerObjectDelayMilliseconds int                      `json:"per_object_delay_milliseconds" yaml:"per_object_delay_milliseconds"`
	Selected                   []CollectionPropsTenants `json:"selected" yaml:"selected"`
}

type MemUse

type MemUse struct {
	WarningPercentage  uint64 `json:"warning_percentage" yaml:"warning_percentage"`
	ReadOnlyPercentage uint64 `json:"readonly_percentage" yaml:"readonly_percentage"`
}

func (MemUse) Validate

func (m MemUse) Validate() error

type MetadataServer added in v1.28.0

type MetadataServer struct {
	// When enabled startup will include a "metadata server"
	// for separation of storage/compute Weaviate.
	Enabled                   bool   `json:"enabled" yaml:"enabled"`
	GrpcListenAddress         string `json:"grpc_listen_address" yaml:"grpc_listen_address"`
	DataEventsChannelCapacity int    `json:"data_events_channel_capacity" yaml:"data_events_channel_capacity"`
}

MetadataServer is experimental.

type OIDC

type OIDC struct {
	Enabled           bool                            `json:"enabled" yaml:"enabled"`
	Issuer            *runtime.DynamicValue[string]   `json:"issuer" yaml:"issuer"`
	ClientID          *runtime.DynamicValue[string]   `json:"client_id" yaml:"client_id"`
	SkipClientIDCheck *runtime.DynamicValue[bool]     `yaml:"skip_client_id_check" json:"skip_client_id_check"`
	UsernameClaim     *runtime.DynamicValue[string]   `yaml:"username_claim" json:"username_claim"`
	GroupsClaim       *runtime.DynamicValue[string]   `yaml:"groups_claim" json:"groups_claim"`
	Scopes            *runtime.DynamicValue[[]string] `yaml:"scopes" json:"scopes"`
	Certificate       *runtime.DynamicValue[string]   `yaml:"certificate" json:"certificate"`
	JWKSUrl           *runtime.DynamicValue[string]   `yaml:"jwks_url" json:"jwks_url"`
}

OIDC configures the OIDC middleware

type Persistence

type Persistence struct {
	DataPath                                     string `json:"dataPath" yaml:"dataPath"`
	MemtablesFlushDirtyAfter                     int    `json:"flushDirtyMemtablesAfter" yaml:"flushDirtyMemtablesAfter"`
	MemtablesMaxSizeMB                           int    `json:"memtablesMaxSizeMB" yaml:"memtablesMaxSizeMB"`
	MemtablesMinActiveDurationSeconds            int    `json:"memtablesMinActiveDurationSeconds" yaml:"memtablesMinActiveDurationSeconds"`
	MemtablesMaxActiveDurationSeconds            int    `json:"memtablesMaxActiveDurationSeconds" yaml:"memtablesMaxActiveDurationSeconds"`
	LSMMaxSegmentSize                            int64  `json:"lsmMaxSegmentSize" yaml:"lsmMaxSegmentSize"`
	LSMSegmentsCleanupIntervalSeconds            int    `json:"lsmSegmentsCleanupIntervalSeconds" yaml:"lsmSegmentsCleanupIntervalSeconds"`
	LSMSeparateObjectsCompactions                bool   `json:"lsmSeparateObjectsCompactions" yaml:"lsmSeparateObjectsCompactions"`
	LSMEnableSegmentsChecksumValidation          bool   `json:"lsmEnableSegmentsChecksumValidation" yaml:"lsmEnableSegmentsChecksumValidation"`
	LSMCycleManagerRoutinesFactor                int    `json:"lsmCycleManagerRoutinesFactor" yaml:"lsmCycleManagerRoutinesFactor"`
	IndexRangeableInMemory                       bool   `json:"indexRangeableInMemory" yaml:"indexRangeableInMemory"`
	MinMMapSize                                  int64  `json:"minMMapSize" yaml:"minMMapSize"`
	LazySegmentsDisabled                         bool   `json:"lazySegmentsDisabled" yaml:"lazySegmentsDisabled"`
	SegmentInfoIntoFileNameEnabled               bool   `json:"segmentFileInfoEnabled" yaml:"segmentFileInfoEnabled"`
	WriteMetadataFilesEnabled                    bool   `json:"writeMetadataFilesEnabled" yaml:"writeMetadataFilesEnabled"`
	MaxReuseWalSize                              int64  `json:"MaxReuseWalSize" yaml:"MaxReuseWalSize"`
	HNSWMaxLogSize                               int64  `json:"hnswMaxLogSize" yaml:"hnswMaxLogSize"`
	HNSWDisableSnapshots                         bool   `json:"hnswDisableSnapshots" yaml:"hnswDisableSnapshots"`
	HNSWSnapshotIntervalSeconds                  int    `json:"hnswSnapshotIntervalSeconds" yaml:"hnswSnapshotIntervalSeconds"`
	HNSWSnapshotOnStartup                        bool   `json:"hnswSnapshotOnStartup" yaml:"hnswSnapshotOnStartup"`
	HNSWSnapshotMinDeltaCommitlogsNumber         int    `json:"hnswSnapshotMinDeltaCommitlogsNumber" yaml:"hnswSnapshotMinDeltaCommitlogsNumber"`
	HNSWSnapshotMinDeltaCommitlogsSizePercentage int    `json:"hnswSnapshotMinDeltaCommitlogsSizePercentage" yaml:"hnswSnapshotMinDeltaCommitlogsSizePercentage"`
}

func (Persistence) Validate

func (p Persistence) Validate() error

type Profiling

type Profiling struct {
	BlockProfileRate     int  `json:"blockProfileRate" yaml:"blockProfileRate"`
	MutexProfileFraction int  `json:"mutexProfileFraction" yaml:"mutexProfileFraction"`
	Disabled             bool `json:"disabled" yaml:"disabled"`
	Port                 int  `json:"port" yaml:"port"`
}

type QueryDefaults

type QueryDefaults struct {
	Limit        int64 `json:"limit" yaml:"limit"`
	LimitGraphQL int64 `json:"limitGraphQL" yaml:"limitGraphQL"`
}

QueryDefaults for optional parameters

type Raft added in v1.25.0

type Raft struct {
	Port              int
	InternalRPCPort   int
	RPCMessageMaxSize int
	Join              []string

	SnapshotInterval  time.Duration
	SnapshotThreshold uint64
	TrailingLogs      uint64

	HeartbeatTimeout   time.Duration
	ElectionTimeout    time.Duration
	LeaderLeaseTimeout time.Duration
	TimeoutsMultiplier *runtime.DynamicValue[int]
	DrainSleep         *runtime.DynamicValue[time.Duration]

	ConsistencyWaitTimeout time.Duration

	BootstrapTimeout   time.Duration
	BootstrapExpect    int
	MetadataOnlyVoters bool

	EnableOneNodeRecovery bool
	ForceOneNodeRecovery  bool
}

func (*Raft) Validate added in v1.25.0

func (r *Raft) Validate() error

type ResourceUsage

type ResourceUsage struct {
	DiskUse DiskUse
	MemUse  MemUse
}

func (ResourceUsage) Validate

func (r ResourceUsage) Validate() error

type RuntimeOverrides added in v1.30.0

type RuntimeOverrides struct {
	Enabled      bool          `json:"enabled"`
	Path         string        `json:"path" yaml:"path"`
	LoadInterval time.Duration `json:"load_interval" yaml:"load_interval"`
}

type SchemaHandlerConfig added in v1.30.0

type SchemaHandlerConfig struct {
	MaximumAllowedCollectionsCount *runtime.DynamicValue[int] `json:"maximum_allowed_collections_count" yaml:"maximum_allowed_collections_count"`
}

type StaticAPIKey added in v1.30.0

type StaticAPIKey struct {
	Enabled     bool     `json:"enabled" yaml:"enabled"`
	Users       []string `json:"users" yaml:"users"`
	AllowedKeys []string `json:"allowed_keys" yaml:"allowed_keys"`
}

type WeaviateConfig

type WeaviateConfig struct {
	Config   Config
	Hostname string
	Scheme   string
}

WeaviateConfig represents the used schema's

func (*WeaviateConfig) GetHostAddress

func (f *WeaviateConfig) GetHostAddress() string

GetHostAddress from config locations

func (*WeaviateConfig) LoadConfig

func (f *WeaviateConfig) LoadConfig(flags *swag.CommandLineOptionsGroup, logger logrus.FieldLogger) error

LoadConfig from config locations. The load order for configuration values if the following 1. Config file 2. Environment variables 3. Command line flags If a config option is specified multiple times in different locations, the latest one will be used in this order.

type WeaviateRuntimeConfig added in v1.30.0

type WeaviateRuntimeConfig struct {
	MaximumAllowedCollectionsCount       *runtime.DynamicValue[int]           `json:"maximum_allowed_collections_count" yaml:"maximum_allowed_collections_count"`
	AutoschemaEnabled                    *runtime.DynamicValue[bool]          `json:"autoschema_enabled" yaml:"autoschema_enabled"`
	AsyncReplicationDisabled             *runtime.DynamicValue[bool]          `json:"async_replication_disabled" yaml:"async_replication_disabled"`
	RevectorizeCheckDisabled             *runtime.DynamicValue[bool]          `json:"revectorize_check_disabled" yaml:"revectorize_check_disabled"`
	ReplicaMovementMinimumAsyncWait      *runtime.DynamicValue[time.Duration] `json:"replica_movement_minimum_async_wait" yaml:"replica_movement_minimum_async_wait"`
	TenantActivityReadLogLevel           *runtime.DynamicValue[string]        `json:"tenant_activity_read_log_level" yaml:"tenant_activity_read_log_level"`
	TenantActivityWriteLogLevel          *runtime.DynamicValue[string]        `json:"tenant_activity_write_log_level" yaml:"tenant_activity_write_log_level"`
	QuerySlowLogEnabled                  *runtime.DynamicValue[bool]          `json:"query_slow_log_enabled" yaml:"query_slow_log_enabled"`
	QuerySlowLogThreshold                *runtime.DynamicValue[time.Duration] `json:"query_slow_log_threshold" yaml:"query_slow_log_threshold"`
	InvertedSorterDisabled               *runtime.DynamicValue[bool]          `json:"inverted_sorter_disabled" yaml:"inverted_sorter_disabled"`
	ReplicatedIndicesRequestQueueEnabled *runtime.DynamicValue[bool]          `json:"replicated_indices_request_queue_enabled" yaml:"replicated_indices_request_queue_enabled"`

	// RAFT specific configs
	RaftDrainSleep        *runtime.DynamicValue[time.Duration] `json:"raft_drain_sleep" yaml:"raft_drain_sleep"`
	RaftTimoutsMultiplier *runtime.DynamicValue[int]           `json:"raft_timeouts_multiplier" yaml:"raft_timeouts_multiplier"`

	// Authentication OIDC settings
	OIDCIssuer            *runtime.DynamicValue[string]   `json:"authentication_oidc_issuer" yaml:"authentication_oidc_issuer"`
	OIDCClientID          *runtime.DynamicValue[string]   `json:"authentication_oidc_client_id" yaml:"authentication_oidc_client_id"`
	OIDCSkipClientIDCheck *runtime.DynamicValue[bool]     `yaml:"authentication_oidc_skip_client_id_check" json:"authentication_oidc_skip_client_id_check"`
	OIDCUsernameClaim     *runtime.DynamicValue[string]   `yaml:"authentication_oidc_username_claim" json:"authentication_oidc_username_claim"`
	OIDCGroupsClaim       *runtime.DynamicValue[string]   `yaml:"authentication_oidc_groups_claim" json:"authentication_oidc_groups_claim"`
	OIDCScopes            *runtime.DynamicValue[[]string] `yaml:"authentication_oidc_scopes" json:"authentication_oidc_scopes"`
	OIDCCertificate       *runtime.DynamicValue[string]   `yaml:"authentication_oidc_certificate" json:"authentication_oidc_certificate"`
	OIDCJWKSUrl           *runtime.DynamicValue[string]   `yaml:"authentication_oidc_jwks_url" json:"authentication_oidc_jwks_url"`
}

WeaviateRuntimeConfig is the collection all the supported configs that is managed dynamically and can be overridden during runtime.

func ParseRuntimeConfig added in v1.30.2

func ParseRuntimeConfig(buf []byte) (*WeaviateRuntimeConfig, error)

ParseRuntimeConfig decode WeaviateRuntimeConfig from raw bytes of YAML.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL