local

package
v0.32.2 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package local implements the search.reranker capability with a pure-Go TF-IDF cosine reranker. No external API calls, no model files, no extra dependencies — useful for offline / cost-sensitive deployments and as the default when no Cohere or Jina key is configured.

Quality is materially below a real cross-encoder (BGE Reranker, Cohere Rerank). The intent here is to provide a working reranker shape so the hybrid orchestrator's reranker hook is exercised end-to-end. A future phase can swap the scorer for an ONNX-backed BGE Reranker behind a build tag without changing the plugin's external surface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() engine.Plugin

Types

type Plugin

type Plugin struct {
	// contains filtered or unexported fields
}

Plugin advertises search.reranker via a pure-Go scorer.

func (*Plugin) Capabilities

func (p *Plugin) Capabilities() []engine.Capability

func (*Plugin) ConfigSchema

func (p *Plugin) ConfigSchema() []byte

ConfigSchema implements engine.ConfigSchemaProvider.

func (*Plugin) Dependencies

func (p *Plugin) Dependencies() []string

func (*Plugin) Emissions

func (p *Plugin) Emissions() []string

func (*Plugin) ID

func (p *Plugin) ID() string

func (*Plugin) Init

func (p *Plugin) Init(ctx engine.PluginContext) error

func (*Plugin) Name

func (p *Plugin) Name() string

func (*Plugin) Ready

func (p *Plugin) Ready() error

func (*Plugin) Requires

func (p *Plugin) Requires() []engine.Requirement

func (*Plugin) Shutdown

func (p *Plugin) Shutdown(_ context.Context) error

func (*Plugin) Subscriptions

func (p *Plugin) Subscriptions() []engine.EventSubscription

func (*Plugin) Version

func (p *Plugin) Version() string

Jump to

Keyboard shortcuts

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