/**
 * Quality scoring utilities shared by BM25, vector, and fusion search.
 *
 * @module services/search/quality
 */
/**
 * Compute a quality-weighted score multiplier from an OCR quality score.
 * Quality 5.0 -> 1.0, Quality 0.0 -> 0.8, null/undefined -> 0.9 (neutral)
 */
export function computeQualityMultiplier(qualityScore) {
    if (qualityScore !== null && qualityScore !== undefined) {
        const clamped = Math.max(0, Math.min(5, qualityScore));
        return 0.8 + 0.04 * clamped;
    }
    return 0.9;
}
//# sourceMappingURL=quality.js.map