document

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

@index Pure search-document content construction from graph nodes and annotations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContent

func BuildContent(node graph.Node, annotations map[uint]*graph.Annotation) string

BuildContent assembles the text indexed for one node's search document. @intent combine symbol names, path/language tokens, and annotation evidence without persistence concerns.

func BuildIntentContent added in v0.13.0

func BuildIntentContent(node graph.Node, annotations map[uint]*graph.Annotation) string

BuildIntentContent assembles the text indexed for one node's recorded reason.

This is deliberately not BuildContent with a filter. BuildContent answers "what is this called", so it mixes the identifier, its split subtokens, and the path into the same text as the annotation prose. A question like "why do we verify the webhook signature" then competes against every node whose *name* happens to contain a query word. Keeping the reason in its own index is what lets that question be scored on the reason alone.

Only @intent and @domainRule are taken. Both answer why the code exists; the remaining tags describe what it does or what it takes, which is the name index's job. @intent index the reason a node exists separately from what the node is called.

Types

type Maintenance

type Maintenance interface {
	RefreshDocuments(ctx context.Context) (int, error)
	RebuildIndex(ctx context.Context) error
}

Maintenance refreshes persisted search documents and the bound full-text index. @intent let inbound orchestration trigger one complete search rebuild without receiving database/backend handles.

Jump to

Keyboard shortcuts

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