/**
 * Reciprocal Rank Fusion (RRF) for Hybrid Search
 *
 * Combines BM25 and semantic search results using rank-based fusion.
 * Formula: score = sum(weight / (k + rank))
 */
interface RRFConfig {
    k: number;
    bm25Weight: number;
    semanticWeight: number;
}
interface RRFSearchResult {
    chunk_id: string | null;
    image_id: string | null;
    extraction_id: string | null;
    embedding_id: string;
    document_id: string;
    original_text: string;
    result_type: 'chunk' | 'vlm' | 'extraction';
    rrf_score: number;
    bm25_rank: number | null;
    bm25_score: number | null;
    semantic_rank: number | null;
    semantic_score: number | null;
    source_file_path: string;
    source_file_name: string;
    source_file_hash: string;
    page_number: number | null;
    character_start: number;
    character_end: number;
    chunk_index: number;
    provenance_id: string;
    content_hash: string;
    found_in_bm25: boolean;
    found_in_semantic: boolean;
    heading_context?: string | null;
    section_path?: string | null;
    content_types?: string | null;
    is_atomic?: boolean;
    page_range?: string | null;
    heading_level?: number | null;
    ocr_quality_score?: number | null;
    doc_title?: string | null;
    doc_author?: string | null;
    doc_subject?: string | null;
    overlap_previous?: number;
    overlap_next?: number;
    chunking_strategy?: string | null;
    embedding_status?: string;
    doc_page_count?: number | null;
    datalab_mode?: string | null;
    total_chunks?: number;
    table_columns?: string[] | null;
    table_row_count?: number | null;
    table_column_count?: number | null;
}
export interface RankedResult {
    chunk_id: string | null;
    image_id: string | null;
    extraction_id?: string | null;
    embedding_id: string;
    rank: number;
    score: number;
    result_type: 'chunk' | 'vlm' | 'extraction';
    document_id: string;
    original_text: string;
    source_file_path: string;
    source_file_name: string;
    source_file_hash: string;
    page_number: number | null;
    character_start: number;
    character_end: number;
    chunk_index: number;
    provenance_id: string;
    content_hash: string;
    heading_context?: string | null;
    section_path?: string | null;
    content_types?: string | null;
    is_atomic?: boolean;
    page_range?: string | null;
    heading_level?: number | null;
    ocr_quality_score?: number | null;
    doc_title?: string | null;
    doc_author?: string | null;
    doc_subject?: string | null;
    overlap_previous?: number;
    overlap_next?: number;
    chunking_strategy?: string | null;
    embedding_status?: string;
    doc_page_count?: number | null;
    datalab_mode?: string | null;
    total_chunks?: number;
    table_columns?: string[] | null;
    table_row_count?: number | null;
    table_column_count?: number | null;
}
export declare class RRFFusion {
    private readonly config;
    constructor(config?: Partial<RRFConfig>);
    fuse(bm25Results: RankedResult[], semanticResults: RankedResult[], limit: number): RRFSearchResult[];
}
export {};
//# sourceMappingURL=fusion.d.ts.map