config

package
v1.38.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: BSD-3-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const EnvNestedFilteringPreview = "WEAVIATE_PREVIEW_NESTED_FILTERING"

EnvNestedFilteringPreview is the env var that toggles the preview gate for nested property indexing and filtering. Exported so callers can reference it from user-facing error messages without duplicating the literal string.

Variables

This section is empty.

Functions

func Enabled

func Enabled(value string) bool

func NestedFilteringDisabledError added in v1.38.0

func NestedFilteringDisabledError() error

NestedFilteringDisabledError returns the standard user-facing error for a nested filter request rejected because the preview gate is off. Centralises the message + env-var name so callers don't drift.

func NestedFilteringEnabled added in v1.38.0

func NestedFilteringEnabled() bool

NestedFilteringEnabled reports whether the preview gate for nested property indexing and filtering is on for this server.

Preview feature. Off by default. Toggle via EnvNestedFilteringPreview; truthy values are the ones recognised by Enabled ("on", "enabled", "1", "true").

Reads the env var on each call (no cache) so tests can override via t.Setenv — Go's testing package serializes env mutations and panics if a parallel test or a test with a parallel ancestor attempts the override, giving us automatic isolation against future t.Parallel() adoption in nested test packages. The cost is one map lookup + boolean parse per call. Most call sites are request-boundary dispatches (validator / searcher / bucket-creation); the analyzer call site (objects.go) is on the per-object/per-property write loop — the per-call env read is acceptable today, but if the cost shows up in profiles, hoist the lookup to once per AnalyzeObject and pass the bool down.

Removed at GA — at that point the feature is unconditionally enabled and call sites lose the gate. Do not depend on this function from long-lived code paths.

Types

This section is empty.

Jump to

Keyboard shortcuts

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