Domain Guide — Schemas and Application Packages

Every Vespa deployment is defined by a declarative Application Package (services.xml,
hosts.xml, schemas/*.sd, validation-overrides.xml, and optional Java OSGi components or
ONNX models). The configuration subsystem in config-admin compiles this package into concrete
per-node configuration payloads.

Anatomy of a Schema (schemas/<name>.sd)

  1. Document Block (document <name>):
    • Declares strongly typed fields (string, int, long, float, double, tensor(...),
      array<T>, weightedset<T>, reference<T>).
    • Parsed and validated by vespa/config-model and vespa/document.
  2. Indexing Pipeline (indexing: ...):
    • Uses the Vespa indexing language (vespa/indexinglanguage) to route raw document fields into:
      • index: inverted index (BM25 / linguistic tokenization).
      • attribute: in-memory/columnar forward store for sorting, grouping, filtering, and HNSW graphs.
      • summary: document summary fields returned in search hits.
  3. Fieldsets and Rank Profiles (fieldset, rank-profile):
    • Group fields for default query matching and define inputs, function macros, first-phase,
      second-phase, global-phase, match-features, and summary-features (see search-ranking).

Compilation and Live Convergence

  • vespa/configserver receives the application package archive via HTTP deploy API.
  • vespa/config-model validates schema compatibility, builds the directed acyclic graph of service
    producers/consumers, and serves derived configs through vespa/config-proxy to container-jdisc
    and content-nodes (see feeding-operations).