package at.procon.dip.search.dto;

import at.procon.dip.domain.access.DocumentVisibility;
import at.procon.dip.domain.document.DocumentFamily;
import at.procon.dip.domain.document.DocumentType;
import at.procon.dip.domain.document.RepresentationType;
import java.time.OffsetDateTime;
import java.util.UUID;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@Builder(toBuilder = true)
@NoArgsConstructor
@AllArgsConstructor
public class SearchHit {
    private UUID documentId;
    private UUID representationId;

    private DocumentType documentType;
    private DocumentFamily documentFamily;
    private DocumentVisibility visibility;

    private String title;
    private String summary;
    private String languageCode;
    private String mimeType;

    private RepresentationType representationType;
    private boolean primaryRepresentation;
    private Integer chunkIndex;
    private Integer chunkStartOffset;
    private Integer chunkEndOffset;
    private int matchedRepresentationCount;

    private SearchEngineType primaryEngine;
    private SearchMatchField matchedField;
    private String snippet;

    private double rawScore;
    private double normalizedScore;
    private double finalScore;

    private OffsetDateTime createdAt;
    private OffsetDateTime updatedAt;
}
