namespace Rag.Models.Responses
{
    public sealed class SearchResponse
    {
        public IReadOnlyList<SearchDocumentResult> Results { get; init; } = System.Array.Empty<SearchDocumentResult>();
    }

    public sealed class SearchDocumentResult
    {
        public required string DocumentId { get; init; }
        public required string DocumentType { get; init; }
        public required string Title { get; init; }
        public string? SourceUrl { get; init; }
        public double Score { get; init; }
        public IReadOnlyList<SearchChunkResult> MatchedChunks { get; init; } = System.Array.Empty<SearchChunkResult>();
    }

    public sealed class SearchChunkResult
    {
        public required string ChunkId { get; init; }
        public int ChunkIndex { get; init; }
        public required string Text { get; init; }
        public double Score { get; init; }
    }
}
