{
  "$schema": "https://json-structure.org/meta/core/v0/#",
  "$id": "https://raw.githubusercontent.com/api-evangelist/backstage/refs/heads/main/json-structure/search-search-result-structure.json",
  "name": "SearchResult",
  "description": "SearchResult schema from Backstage search API",
  "type": "object",
  "properties": {
    "type": {
      "type": "string",
      "description": "The document type (e.g., software-catalog, techdocs)."
    },
    "document": {
      "$ref": "#/components/schemas/SearchDocument"
    },
    "rank": {
      "type": "double",
      "description": "Relevance rank of the result."
    },
    "highlight": {
      "type": "object",
      "properties": {
        "preTag": {
          "type": "string"
        },
        "postTag": {
          "type": "string"
        },
        "fields": {
          "type": "object",
          "additionalProperties": {
            "type": "string"
          }
        }
      }
    }
  }
}