Documentation
¶
Index ¶
Constants ¶
View Source
const ( // PGvectorProvider selects the pgvector-backed vectorsearch.Index implementation. PGvectorProvider = "pgvector" // QdrantProvider selects the Qdrant-backed vectorsearch.Index implementation. QdrantProvider = "qdrant" )
Variables ¶
This section is empty.
Functions ¶
func ProvideIndex ¶
func ProvideIndex[T any]( ctx context.Context, logger logging.Logger, tracerProvider tracing.TracerProvider, metricsProvider metrics.Provider, cfg *Config, db database.Client, indexName string, ) (vectorsearch.Index[T], error)
ProvideIndex builds a vectorsearch.Index for the configured provider. The db argument is required only when Provider is PGvectorProvider; pass nil otherwise. Unknown or empty providers fall back to a noop index, matching the search/text dispatch convention.
Types ¶
type Config ¶
type Config struct {
Pgvector *pgvector.Config `env:"init" envPrefix:"PGVECTOR_" json:"pgvector"`
Qdrant *qdrant.Config `env:"init" envPrefix:"QDRANT_" json:"qdrant"`
Provider string `env:"PROVIDER" json:"provider"`
CircuitBreaker circuitbreakingcfg.Config `env:"init" envPrefix:"CIRCUIT_BREAKER_" json:"circuitBreakerConfig"`
// contains filtered or unexported fields
}
Config dispatches to a vectorsearch provider implementation.
Click to show internal directories.
Click to hide internal directories.