/**
 * Hybrid Search Engine
 *
 * Combines vector similarity search with BM25 keyword search for
 * improved recall and precision. Supports searching across multiple
 * sources (memories, code, messages).
 *
 * Formula: hybridScore = vectorWeight * vectorScore + bm25Weight * bm25Score
 * Default weights: 70% vector, 30% BM25
 *
 * Vector search powered by USearch for O(log n) approximate nearest neighbor search.
 * @see https://github.com/unum-cloud/usearch
 */
import { EventEmitter } from 'events';
import type { HybridSearchResult, HybridSearchOptions, HybridSearchConfig, SearchSource, BM25Document } from './types.js';
/**
 * Hybrid search engine combining vector and BM25 search
 */
export declare class HybridSearchEngine extends EventEmitter {
    private config;
    private bm25Indexes;
    private vectorIndexes;
    private embeddingProvider;
    private memoryRepository;
    private cache;
    private initialized;
    private embeddingDimensions;
    constructor(config?: Partial<HybridSearchConfig>);
    /**
     * Initialize the search engine
     */
    initialize(): Promise<void>;
    /**
     * Search across all sources
     */
    search(options: HybridSearchOptions): Promise<HybridSearchResult[]>;
    /**
     * Search a specific source
     */
    private searchSource;
    /**
     * Vector search using USearch HNSW index
     * O(log n) approximate nearest neighbor search
     */
    private vectorSearch;
    /**
     * Vector search memories using USearch
     * @deprecated Use vectorSearch(source, query, options) instead
     */
    private vectorSearchMemories;
    /**
     * Index a document
     */
    indexDocument(source: SearchSource, doc: BM25Document): Promise<void>;
    /**
     * Index multiple documents
     */
    indexDocuments(source: SearchSource, docs: BM25Document[]): Promise<void>;
    /**
     * Remove a document from the index
     */
    removeDocument(source: SearchSource, docId: string): boolean;
    /**
     * Rebuild indexes from data sources
     */
    rebuildIndexes(): Promise<void>;
    /**
     * Index a vector embedding for a document
     */
    indexVector(source: SearchSource, id: string, embedding: number[], metadata?: Record<string, unknown>): Promise<void>;
    /**
     * Index multiple vector embeddings
     */
    indexVectors(source: SearchSource, vectors: Array<{
        id: string;
        embedding: number[];
        metadata?: Record<string, unknown>;
    }>): Promise<void>;
    /**
     * Remove a vector from the index
     */
    removeVector(source: SearchSource, id: string): boolean;
    /**
     * Get cache key for search options
     */
    private getCacheKey;
    /**
     * Clear the search cache
     */
    clearCache(): void;
    /**
     * Get search statistics
     */
    getStats(): {
        bm25Indexes: Record<string, {
            totalDocuments: number;
            uniqueTerms: number;
        }>;
        vectorIndexes: Record<string, {
            size: number;
            dimensions: number;
            memoryUsage: number;
        }>;
        cacheSize: number;
        embeddingProviderAvailable: boolean;
        usearchEnabled: boolean;
    };
    /**
     * Update configuration
     */
    updateConfig(config: Partial<HybridSearchConfig>): void;
    /**
     * Dispose and cleanup
     */
    dispose(): void;
}
/**
 * Get or create the HybridSearchEngine singleton
 */
export declare function getHybridSearchEngine(config?: Partial<HybridSearchConfig>): HybridSearchEngine;
/**
 * Reset the HybridSearchEngine singleton
 */
export declare function resetHybridSearchEngine(): void;
