Bridge Note: PyVespa SDK, Sample Apps, and Documentation Schema Contracts

Conceptual Bridge

This note bridges client-side Python abstractions (pyvespa), reference application schemas (sample-apps), text editor syntax definitions (documentation/_grammars), and frontend search fetchers (vespa-search) with the engine’s Java config-model parser and HTTP/2 endpoints.

Synchronization Points

  1. Schema Generation and Validation:
    • pyvespa/vespa/package.py models Schema, Document, and Field constructs in Python, generating .sd files that must strictly adhere to the grammar defined in documentation/_grammars/vespa-schema.tmLanguage.json and parsed by vespa/config-model.
  2. HTTP API Contract Alignment:
    • pyvespa/vespa/application.py and vespa-search/src/App/libs/fetcher/index.js interact with /document/v1/ and /search/ endpoints, requiring consistent serialization of tensor parameters (input.query(...)) and JSON document structures.
  3. Reference App Conformance:
    • The 27 sample applications in sample-apps/ serve as operational templates demonstrating proper usage of rank profiles, tensor fields, and document processors.