pub struct Slot {
pub field: Ident,
pub engine: Ident,
}Expand description
ONE SLOT: a field and the engine that holds it.
§Slot identity moved, and this type is the move
It used to be the DECLARATION — one FulltextTable::SLOT per index, and one declaration, one
slot was the keystone the brand rested on. Under the engine grammar it is (field × engine),
and the per-slot laws follow it there: ONE Tantivy index per slot, because BM25’s corpus
statistics are index-wide, is now one index per (field, engine) — which is what makes two
fields of one declaration searchable independently without their scores moving under each other.
The COLUMN axis is unchanged and is one grain finer: a vector slot may still hold several
columns, and VectorColumn still says which one a knn runs over. What this type adds is the axis
above it, not a replacement for the one below.
Fields§
§field: IdentThe elected field.
engine: IdentThe engine word — as WRITTEN, since a free word has no other spelling.
Implementations§
Source§impl Slot
impl Slot
Sourcepub fn name(&self, index: &Ident) -> String
pub fn name(&self, index: &Ident) -> String
This slot’s durable NAME, as the emission mints it: <index>__<field>__<engine>.
§Why all three parts, and why the double underscore
A slot name reaches a directory, a table or a virtual table, so two slots sharing one is two declarations sharing a corpus — the exact class the brand exists to keep out. All three parts are therefore in the name: two indexes may declare a field of the same name, and one field may name several engines.
The separator is __ because a single one is legal INSIDE each part — image_embedding is a field
name — so a single-underscore join would let a_b × c and a × b_c mint one name. It is
not the framework’s __…__ fence: that reservation is both ends, and this name has neither.
SNAKE CASE from the index’s own name, which is the convention
RecordModel::table_name already defaults a table to
— one convention for every durable name a declaration mints.
Sourcepub fn marker(&self, index: &Ident) -> Ident
pub fn marker(&self, index: &Ident) -> Ident
The ZERO-SIZED TYPE this slot is carried as — <Index><Field><Engine>.
A TYPE and not a name, for the reason the election markers are types: a handle branded with a
slot cannot be handed to another slot’s door, and a brand is a fact carried through the types.
A SlotName alone would put the pairing back in a value, where a swap is a runtime mistake
nobody sees.