Skip to main content
The index is three structures over one set of nodes: a tree of contexts, a graph of concepts, and a vector per node. Each answers a different question, and one search combines them. None of them holds source text. The index keeps where a fact is written, never the words. This page names no deployment. It speaks of domain knowledge (the documents, rules and entries an index is built from) and contexts (the topic tree that organizes it).

The records and where they live

Records that come from the source

Document and passage

A Passage has an address, its text as written (in memory only), a fingerprint, and a section, a heading or path that guides the choice of context.

Document version

A DocVersion is three hashes, one for each kind of change. Comparing the stored DocVersion with the source’s manifest classifies each unit as new, changed, unchanged or removed, without reading any text.

Declared entries

A routing rule, a glossary term or a taxonomy already says what it is called and what people type for it. A Declared entry carries a word (the name), keywords (the user words: aliases, synonyms and markers) and facts (other label: value lines). It becomes one concept with no model call. Its passages still carry the text the evidence points at.

Records the index keeps

Concept

Evidence

Evidence is a position and a fingerprint, never text. The model forbids extra fields, so a quote cannot be stored by accident. Evidence is made by locating a quote in code. A model only supplies the span it relied on. Code finds it in the passage and computes the position. A quote that cannot be found is dropped, and a concept left with no evidence does not exist. At search time the resolver reads the live source and returns one status for each piece of evidence:

Relation

A relation is a typed edge from the concept that holds it to target, a concept id that may not exist yet. type is a relation of the ontology, which says which concept types it may join, its cardinality, and whether a machine may create it. evidence_ids point at evidence of the holding concept. A relation without evidence is allowed only if it is structural, meaning it came from the source’s own data, and it is re-sent with every update.

Context

Pin

A pin is a ContextChoice { passage_fingerprint, metadata_version, word, context, generated }. It records where a word of a passage was placed. A rebuild replays it instead of asking a model again, so rebuilding gives the same index. A change to the document’s metadata re-opens the choice.

Ontology

The ontology is configuration, not a record of the index. It is a set of concept types and relation types, each with allowed source and target types, a cardinality, and whether only a human may create it. It is checked in code when a contribution is applied. Changing it re-runs validation, not extraction.

Context tree

How concepts are placed, and how they link.

Ownership and merging

What happens when a contribution is applied.