Skip to main content

Module index

Module index 

Source
Expand description

A DERIVED INDEX’s emission — the expansion that carries an identity it did not mint.

A full-text index, an embedding index and a family of artifacts are one shape with three storages: each subscribes to exactly one upstream, holds one document per message it saw, and is addressed by THAT MESSAGE’s key. The key is not its to mint — so there is no id field, no *Key struct and no *Lineage struct in this emission, and the two address types a record declares are here as PROJECTIONS of the upstream’s instead.

ⓘ
#[ingraph::fulltext(upstream(node = "asr::Segment", title = "speaker", body = "text"))]
pub struct SearchDocument {
  #[ingraph(searchable)] title: String,
  #[ingraph(searchable)] body: String,
}

§The two halves the compiler checks, and why neither could be checked here

A macro holds tokens. The upstream is another declaration’s, and two macro expansions cannot see each other — so nothing about asr::Segment is knowable at the moment this expansion is written. Both facts the declaration asserts are therefore EMITTED for rustc to resolve, each at the string the author wrote:

assertedemittedrefused as
the upstream is a nodethe entity binding’s own boundE0412 unresolved · E0277 not a node
a projection names a field of itIndexModel::projectionsE0609 no field · E0616 private · E0308 wrong type

A DIRECT FIELD READ rather than an accessor call, and that was the fork: a record’s accessor is spelled four ways depending on the projection its own declaration asked for — x, x_ref, x_slice — and this expansion cannot see which. The field’s name is the one spelling that does not vary, which is also why the pivot stamps pub(crate) on a declaration’s fields: the read has to be legal from the module the index was declared in.

§What it does NOT emit, and the absences are not eras

No *Key, no *Lineage, no row, no wire face and no order — a derived index stores documents in an engine of its own rather than rows in a database, and every one of those is the row half of a record.

WHICH engines hold the documents IS emitted, and it is per FIELD: each (elected field × declared engine) becomes a slot marker at module scope, and a fanout field gets the door that writes all of them at once. See crate::engine for the semantics — several engines are portability, the default is single-write, and the marker is the one departure. What is still nobody’s here is the READ side’s fan-and-fuse, which is the face round’s.

Structs§

Elected
WHICH field of a vector declaration a knn runs over — one #[ingraph(knn)] marker’s answer.
ElectionBackend
ONE backend’s block on an ELECTION — graphql(async_graphql(first = 20, keys(rename = "…"))).
FieldNumbers
ONE FIELD’s numbers, and the skins that dress them — the ELECTION tier.
IndexBackend
ONE backend’s block inside a derived index’s graphql(…).
IndexGraphql
WHICH GRAPHQL BACKENDS DRESS THIS DECLARATION — the graphql(…) block, or None where the declaration named none.
IndexModel
A validated derived index: which storage it is, what it draws from, and the fields it declares.
Labelled
A LABELLED FIELD no election names — the field, its type and the label it wrote.
Numbers
THE FOUR NUMBERS a declaration writes about its own doors — the BONES tier of the wire road’s number design.
Projected
One field of the index, and the upstream field it is read out of.
Upstream
The upstream a derived index draws from, and which of its fields each of the index’s own is read out of.

Enums§

Dedup
HOW a retrieve tells two of this index’s keys apart — the dedup(…) word.
ElectionLabel
WHAT AN ELECTED FIELD HOLDS, as its own LABEL states it — embedding or list(embedding).
Field
WHICH of an election’s QUERY FIELDS a name is being asked for — a closed vocabulary of five, one per road an election can mount and no more.
Fold
WHICH FOLD an election declared — a shipped CITIZEN by its word, or a type by its PATH.
IndexRename
WHAT THIS DECLARATION’S MINTED RUST TYPES ARE CALLED — the top-level rename word, in whichever of its two forms it was written.
RenamePiece
WHICH MINT a rename(…) entry is about — the CLOSED vocabulary, read off the emitted-types roster.

Constants§

DATA
The data word itself, spelled once.
FRAMEWORK_LIMIT
THE FRAMEWORK’S OWN ANSWER TO HOW MANY — the floor of the wire default’s chain, and the number a schema publishes where no tier of a declaration wrote one.

Functions§

data_wrong_kind
What an author who wrote data on the wrong kind is told.