type: object
description: |
    Search result from `POST /admin/kb/search` — the document chunks that match
    the query, without the LLM generation step. Optionally re-ranked by Cohere.
required: [results, metadata]
properties:
    results:
        type: array
        items:
            type: object
            properties:
                chunkId: { type: string }
                documentId: { type: string }
                title: { type: string }
                sourceType: { type: string }
                sourceUrl: { type: string }
                relevance:
                    type: number
                    description: Cosine similarity (0–1).
                content:
                    type: string
                    description: Full chunk content.
                metadata:
                    type: object
                    additionalProperties: true
                    description: Source-specific metadata.
    metadata:
        type: object
        properties:
            totalTimeMs: { type: integer }
            resultCount: { type: integer }
example:
    results:
        - chunkId: "chk_01HZS12345"
          documentId: "doc_01HZS67890"
          title: "Shipping module overview"
          sourceType: "document"
          sourceUrl: "docs/services/admin-api/shipping.md"
          relevance: 0.91
          content: "The shipping pipeline is split between BigShipperApi (picking + packing state machine) and ShippingAdminApi (Shippo integration, analytics)..."
          metadata:
              path: "docs/services/admin-api/shipping.md"
    metadata:
        totalTimeMs: 142
        resultCount: 1
