Skip to main content

Module index_publication

Module index_publication 

Expand description

An app’s search entries as the system’s persistent search index takes them.

The vocabulary and the incremental Publisher live in the toolkit-free resource layer ([tilo_resource::search_index]): a toolkit app’s window and a tilolang app’s instance publish to the same one index, so both read the same types. They are re-exported here under their toolkit path, which every app provider and the framework’s root already use.

A running app publishes what its search finds (each entry’s title, secondary line and short fields, keyed by the stable resource id a hit opens) to the session over its certified broker route, and the session keeps it after the app closes, so the app’s content stays findable whether or not it runs. Only short metadata crosses: prose bodies stay in the app, and a secret-bearing entry (IndexEntry::secret) carries what the app chose to show of it (a name, a username, a site), never a secret.

The publication is incremental: a Publisher remembers what its connection last sent and sends an IndexDelta of what changed, the whole set again (reset) only on a new route.

Structs§

IndexAction
A published action a hit invokes: an action of a resource the app publishes, by their ids.
IndexDelta
A change to what one app connection published.
IndexEntry
One search entry, as the system index keeps it.
IndexPerson
A person or an agent an entry is about: who a row shows and what it says under its name.
IndexState
What an app’s search source is of now, read every frame: a publication is rebuilt only when it changes.
Publisher
What one route last published, so only what changed is sent again.

Enums§

IndexKind
What kind of thing an entry is, where the app keeps something the desk’s generic rows would read poorly: each is its own section, drawn as what it is rather than as a record.
IndexWeight
How much a match in one of an entry’s fields counts.

Constants§

MAX_DELTA_BYTES
Encoded bytes one IndexDelta may take; a larger change is sent as several.
MAX_ENTRIES
Entries one publication holds; the rest of a larger set is not indexed.
MAX_FIELDS
Short fields one entry is found by.
MAX_ID_BYTES
Bytes of a resource id, action or key.
MAX_TEXT_BYTES
Bytes of one text an entry carries (its title, its secondary line, one field); longer text is cut at a character boundary.