Documentation
¶
Overview ¶
Package noteindex keeps on each note what finds it without opening it (#145): the blinds of the grams of its title and content for searchnotes, the blinds of the titles its [[links]] wait for for linknotes, whether it has a link or a file and the blinds of its headings for listbrokenlinks, the blinds of the grams of its headings (#169). A trigger of createschema empties them when the content changes, whoever writes it; Fill makes them again before they are read.
Index ¶
- func Fill(ctx context.Context, db bun.IDB) error
- func FillAll(ctx context.Context, db bun.IDB) error
- func Grams(text string) []string
- func HeadingName(heading string) string
- func Headings(userID, content string) ([]int16, []string, error)
- func Linked(content string) bool
- func Query(userID, text string) ([]int16, error)
- func Waiting(userID, content string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Fill ¶
Fill indexes the notes of the account of ctx, trashed too, whose content changed since their last Fill (grams NULL). A note written again meanwhile keeps NULL: the content compared is the one indexed.
func FillAll ¶
FillAll runs Fill for every account with notes left to index: tide-server serve runs it at start and in its loop, so a base just upgraded is indexed before its first search, and the notes of an idle account do not slow the Fill of the others.
func Grams ¶
Grams gives the pieces of 2 and 3 letters of text lowered: a text holding another holds all its grams.
func HeadingName ¶
HeadingName gives heading as a [[Note#Heading]] names it: no parentheses, trimmed. Blind ignores the case.
func Headings ¶
Headings gives the blinds of the grams of the headings of content, and the blind of each heading's HeadingName.
func Linked ¶
Linked tells whether content has what listbrokenlinks checks: a [[link]], a link to a note, a [label](path.md) link, the address of a file.
Types ¶
This section is empty.