Tencent/WeKnora · error
create opensearch client: %w
Error message
create opensearch client: %w
What it means
createOpenSearchEngine wraps openSearchRepo.NewOpenSearchClient failure. The TLS-hardened client could not be constructed from the store's connection config (bad address/credentials/TLS setup), so the engine can't register.
Source
Thrown at internal/container/engine_factory.go:142
return err
}
return check("weaviate gRPC address", cc.GrpcAddress)
default:
return fmt.Errorf("vector store engine %q has no SSRF address policy", store.EngineType)
}
}
// createOpenSearchEngine builds an OpenSearch k-NN retrieve engine. Mirrors
// createElasticsearchV8Engine but uses the driver's TLS-hardened client
// constructor and injects the audit sink. NewRepository probes the cluster
// (version + k-NN plugin), so an unreachable cluster fails here at
// registration rather than on first query.
func createOpenSearchEngine(
ctx context.Context, store types.VectorStore, auditSink openSearchRepo.AuditSink,
) (interfaces.RetrieveEngineService, error) {
client, err := openSearchRepo.NewOpenSearchClient(&store.ConnectionConfig)
if err != nil {
return nil, fmt.Errorf("create opensearch client: %w", err)
}
// Env stores share the cluster without a per-store index prefix; DB stores
// fold their (>=16-char) ID into the index name. NewRepository enforces the
// length rule, so map env-store IDs to "".
storeID := store.ID
if types.IsEnvStoreID(storeID) {
storeID = ""
}
repo, err := openSearchRepo.NewRepository(ctx, client, storeID, &store.IndexConfig,
openSearchRepo.WithAuditSink(auditSink))
if err != nil {
return nil, fmt.Errorf("create opensearch repository: %w", err)
}
return retriever.NewKVHybridRetrieveEngine(repo, types.OpenSearchRetrieverEngineType), nil
}
func createPostgresEngine(store types.VectorStore, db *gorm.DB) (interfaces.RetrieveEngineService, error) {
if store.ConnectionConfig.UseDefaultConnection {View on GitHub (pinned to 988cbb0330)
Solutions
- Check the OpenSearch connection config (addr, credentials, TLS)
- Inspect the wrapped client-construction error
- Fix the store config and re-register the engine
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at internal/container/engine_factory.go:142 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of Tencent/WeKnora@988cbb0330 (2026-09-02).
Data as JSON: /api/errors/3ae52fd1b54bab24.
Report an issue: GitHub.