package org.raddatz.familienarchiv.document;

import io.swagger.v3.oas.annotations.media.Schema;

/**
 * Character-level offset of a highlighted term within a text field.
 * Offsets are Java {@code String} character positions (UTF-16 code units),
 * which are identical to JavaScript string positions — consistent end-to-end
 * for all German BMP characters (ä, ö, ü, ß, etc.).
 */
public record MatchOffset(
        @Schema(requiredMode = Schema.RequiredMode.REQUIRED) int start,
        @Schema(requiredMode = Schema.RequiredMode.REQUIRED) int length
) {}
