Documentation
¶
Overview ¶
Package search contains the reusable web search core shared by tool wrappers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetConfiguredProviders ¶
func GetConfiguredProviders() []string
GetConfiguredProviders returns the configured provider names for diagnostics and UI.
func GetProviderMode ¶
func GetProviderMode() string
GetProviderMode returns the current provider mode from environment.
Types ¶
type Cache ¶
Cache is a search-specific view over the shared web TTL cache.
func DefaultCache ¶
func DefaultCache() *Cache
DefaultCache returns the default shared cache used for repeated identical search queries.
type HTTPProvider ¶
type HTTPProvider struct {
// contains filtered or unexported fields
}
HTTPProvider is a configurable HTTP search provider.
func NewHTTPProvider ¶
func NewHTTPProvider() *HTTPProvider
NewHTTPProvider creates a provider from environment configuration.
func (*HTTPProvider) IsConfigured ¶
func (p *HTTPProvider) IsConfigured() bool
func (*HTTPProvider) Name ¶
func (p *HTTPProvider) Name() string
func (*HTTPProvider) Search ¶
func (p *HTTPProvider) Search(input providers.SearchInput) (providers.ProviderOutput, error)
type Input ¶
Input represents a normalized search request for the shared search core.
func (Input) Request ¶
func (i Input) Request() webcore.SearchRequest
Request converts the local search input into the shared request type used across the web stack.
type Output ¶
type Output = webcore.SearchResponse
Output represents a normalized search response produced by the shared search core.
func FinalizeOutput ¶
func FinalizeOutput(input Input, providerOutput providers.ProviderOutput) Output
FinalizeOutput applies the shared normalization, filtering, dedupe, and ranking used by the core search service so backend callers can stay behaviorally aligned.
func OutputFromProvider ¶
func OutputFromProvider(input Input, output providers.ProviderOutput) Output
OutputFromProvider adapts provider-native hits into the shared search response contract.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service wraps provider discovery and execution behind a stable shared search interface.
func NewService ¶
func NewService() *Service
NewService creates a shared search service using the current environment-driven provider mode.
func NewServiceWithConfig ¶
NewServiceWithConfig creates a shared search service with explicit cache overrides when needed.
func (*Service) ProviderMode ¶
ProviderMode reports the provider mode selected when the service was constructed.
func (*Service) Search ¶
func (s *Service) Search(ctx context.Context, request webcore.SearchRequest) (webcore.SearchResponse, error)
Search executes the configured provider chain and returns the shared search response contract.