Documentation
¶
Index ¶
Constants ¶
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 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.