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§
- Index
Action - A published action a hit invokes: an action of a resource the app publishes, by their ids.
- Index
Delta - A change to what one app connection published.
- Index
Entry - One search entry, as the system index keeps it.
- Index
Person - A person or an agent an entry is about: who a row shows and what it says under its name.
- Index
State - 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§
- Index
Kind - 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.
- Index
Weight - How much a match in one of an entry’s fields counts.
Constants§
- MAX_
DELTA_ BYTES - Encoded bytes one
IndexDeltamay 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.