{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kentekenkompas-nl/json-schema/kentekenkompas-nl-search-result-schema.json",
  "title": "SearchResult",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kentekenkompas-nl-openapi.yml#/components/schemas/SearchResult",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "id",
    "type",
    "title",
    "answerPreview",
    "relevanceScore",
    "relevanceTier",
    "matchedTerms",
    "matchedIntent",
    "matchReasons",
    "classification",
    "freshnessSummary",
    "citationUrl"
  ],
  "properties": {
    "id": {
      "type": "string"
    },
    "type": {
      "type": "string",
      "enum": [
        "model",
        "answer",
        "term",
        "topic",
        "source"
      ]
    },
    "title": {
      "type": "string"
    },
    "answerPreview": {
      "type": "string"
    },
    "relevanceScore": {
      "type": "number",
      "minimum": 0,
      "description": "Deterministic lexical score; not AI confidence."
    },
    "relevanceTier": {
      "type": "string",
      "enum": [
        "EXACT",
        "STRONG",
        "RELATED"
      ]
    },
    "matchedTerms": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "matchedIntent": {
      "type": "string",
      "enum": [
        "MODEL_OVERVIEW",
        "BODY_CONFIGURATION",
        "POWERTRAIN",
        "TERM_EXPLANATION",
        "COMPARISON",
        "PROVENANCE",
        "CLASSIFICATION_EXPLANATION",
        "FRESHNESS",
        "FUEL_CONTEXT",
        "GENERAL"
      ]
    },
    "matchReasons": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "classification": {
      "$ref": "#/$defs/Classification"
    },
    "freshnessSummary": {
      "$ref": "#/$defs/SearchFreshnessSummary"
    },
    "modelKey": {
      "type": "string"
    },
    "citationUrl": {
      "type": "string",
      "format": "uri"
    }
  },
  "$defs": {
    "Classification": {
      "type": "string",
      "enum": [
        "OFFICIAL",
        "DERIVED",
        "EDITORIAL"
      ],
      "description": "OFFICIAL: directly stated by the identified official/primary source. DERIVED: reproducibly derived by KentekenKompas from source data. EDITORIAL: KentekenKompas interpretation or guidance; never an official RDW fact."
    },
    "SearchFreshnessSummary": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "status"
      ],
      "properties": {
        "dataAsOf": {
          "type": "string",
          "format": "date"
        },
        "sourceCheckedAt": {
          "type": "string",
          "format": "date"
        },
        "editorialReviewedAt": {
          "type": "string",
          "format": "date"
        },
        "generatedAt": {
          "type": "string",
          "format": "date-time"
        },
        "status": {
          "type": "string",
          "enum": [
            "AVAILABLE",
            "NOT_EXPOSED_IN_SEARCH_INDEX"
          ]
        }
      }
    }
  }
}