Documentation
¶
Overview ¶
Package searchruntime exposes the deep WAS search module used by MCP.
It deliberately hides PostgreSQL, profile, and vector-engine construction so the MCP repository depends on one stable interface instead of WAS internals.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrInvalidArgument reports an invalid search request or runtime configuration. ErrInvalidArgument = knowledge.ErrInvalidArgument // ErrProfileMismatch reports an incompatible processing or vector profile. ErrProfileMismatch = knowledge.ErrProfileMismatch ErrTemporarilyUnavailable = knowledge.ErrTemporarilyUnavailable )
Functions ¶
func IsRetryable ¶
IsRetryable reports whether err represents a dependency outage safe to retry.
Types ¶
type Config ¶
type Config struct {
DatabaseURL string
ModelPath string
TokenizerPath string
RuntimeLibraryPath string
PublicBaseURL string
MinimumScore float64
// OriginalRoot enables citation-integrity verification for grounded search.
// It is optional for source compatibility; when omitted, grounded hits fail
// closed as SOURCE_UNAVAILABLE while the legacy Documents method still works.
OriginalRoot string
}
Config contains the process-owned dependencies needed by the MCP search runtime. MinimumScore defaults to 0.62 when zero.
type Hit ¶
type Hit struct {
Rank int
Score float64
DocumentID string
DocumentName string
VersionID string
DocumentVersion int
PageNumber int
Snippet string
SourceURL string
}
Hit is one ranked, page-grounded result from the active document version.
type Runtime ¶
type Runtime struct {
// contains filtered or unexported fields
}
Runtime owns the database pool, pinned vector engine, and search module.
func (*Runtime) Close ¶
Close releases the vector runtime and database pool. It is safe to call repeatedly.
func (*Runtime) Documents ¶
Documents validates, embeds, and searches only active document versions.