Search Indexing Service  ·  View 12 of 21  ·  Data

Data Model

Twelve entities, and one composite key doing the work of a deduplication service.

Editable source SVG draw.io All views
tenant tenant_id PK quota_docs quota_index_rate placement shared|dedicated index_definition definition_id PK tenant_id FK -> tenant version immutable document_shape analysis_config freshness_classes relevance_config source_binding binding_id PK definition_id FK source_name join_key capture_mode quiet_period_s index_version index_name PK definition_id FK state building|live|retained doc_count built_from_snapshot catchup_log_offset alias alias_name PK index_name FK -> index_version variant_split swapped_at swapped_by document entity_key PK index_name FK assembly_version source_versions map degraded_flags assembled_at entity_state entity_key PK source_name PK applied_version parent_key enrichment_ref change_event source_name PK entity_key PK source_version PK change_type committed_at logged_at fanout_job job_id PK parent_key FK -> entity_state children_total children_done rate_limit reindex_job job_id PK index_name FK -> index_version checkpoints per partition gate_result started_at judgement_set set_id PK definition_id FK query entity_key grade query_event query_id PK alias_name FK -> alias index_name relevance_version results engagement 1 : N 1 : N N : 1 1 : N 1 : N 1 : N 1 : N N : 1 1 : N sampled 1 : N Data Model — Definitions, Documents and Evidence The composite key (source, entity_key, source_version) is what makes redelivery a primary-key collision rather than a regression. Checkpoint and quota tables are omitted. v 1.0 · owner Data Platform Architecture

Decisions

  • The change event's key is (source, entity_key, source_version). Redelivery becomes a primary-key collision and reordering becomes a comparison, rather than two detection problems.
  • An index definition is immutable and versioned; an index_version records which definition and which snapshot it was built from, so a live index can always name its own provenance.
  • An alias is a first-class entity with a variant split, a swapped_at and a swapped_by — the audit of what everyone saw and who changed it.
  • A document carries its contributing source versions. A document that cannot say what it was built from cannot be reconciled.

Omitted

  • Per-partition checkpoint rows, quota counters and the enrichment cache, which are mechanical rather than structural.
  • The sampled link from query_event to judgement_set is drawn dashed because it is a curation path, not a foreign key.