Documentation
¶
Overview ¶
Package search provides full-text search over the neuron vault using an in-memory inverted index with BM25-like relevance scoring.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Index ¶
type Index struct {
// contains filtered or unexported fields
}
Index is a thread-safe in-memory inverted index.
func (*Index) RemoveNote ¶
RemoveNote removes a note from the index by ID.
type SearchResult ¶
SearchResult pairs a note with its relevance score.
type SemanticIndex ¶
type SemanticIndex struct {
// contains filtered or unexported fields
}
SemanticIndex provides vector-based semantic search over notes using local embeddings.
func NewSemanticIndex ¶
func NewSemanticIndex(cfg *config.Config) (*SemanticIndex, error)
NewSemanticIndex initializes a new semantic index using the provided AI configuration.
func (*SemanticIndex) Rebuild ¶
Rebuild clears and rebuilds the entire semantic index. This may take time if there are many notes and embeddings must be generated.
func (*SemanticIndex) Search ¶
func (idx *SemanticIndex) Search(ctx context.Context, query string, limit int) ([]*SearchResult, error)
Search queries the semantic index and returns the top results.