modelsext

package
v1.37.1 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package modelsext provides extension methods to the structures in the models package. As this package is generated, we cannot put any functionality or helper methods straight into it.

As the models package is used very widely throughout the repository, extensions package should not import anything outside the models package as well to avoid any circular dependencies.

To keep things tidy, use these conventions: 1. Helpers for the struct in models/X.go should be in modelsext/X.go . 2. Functions should be named <struct name><aspirational method name>.

Index

Constants

View Source
const DefaultNamedVectorName = "default"

DefaultNamedVectorName is a default vector named used to create a named vector or to allow access to legacy vector through named vector API.

View Source
const VectorIndexTypeNone = "none"

VectorIndexTypeNone is the VectorIndexType value used to mark a named vector whose search index has been dropped but whose vector data still exists in the objects bucket. This is mirrored from entities/vectorindex to avoid an import cycle.

Variables

This section is empty.

Functions

func ClassGetVectorConfig

func ClassGetVectorConfig(class *models.Class, targetVector string) (models.VectorConfig, bool)

ClassGetVectorConfig returns the vector config for a given class and target vector. There is a special case for the default vector name, which is used to access the legacy vector.

func ClassHasLegacyVectorIndex

func ClassHasLegacyVectorIndex(class *models.Class) bool

ClassHasLegacyVectorIndex checks whether there is a legacy index configured on a class.

func ClassUsesVectorisation added in v1.36.0

func ClassUsesVectorisation(class *models.Class) bool

func IsVectorIndexDropped added in v1.37.0

func IsVectorIndexDropped(cfg models.VectorConfig) bool

IsVectorIndexDropped returns true if the named vector config entry represents a dropped index — i.e. the vector data still exists in the objects bucket but the search index has been removed from disk.

Types

This section is empty.

Jump to

Keyboard shortcuts

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