/**
 * Local 검색 서비스 구현
 * Phase 3.6: searchLocal 메서드 분리 - 파이프라인 단계별 메서드 분리
 */
import type Database from 'better-sqlite3';
import type { AnchorSlot, IAnchorCacheService, SearchOptions } from './anchor-interfaces.js';
import type { IFallbackStrategy, INHopSearchStrategy, IQueryFilterStrategy, NHopSearchResult } from './search-strategy-interfaces.js';
/**
 * 앵커 정보 및 임베딩
 */
export interface AnchorWithEmbedding {
    memory_id: string;
    embedding: {
        embedding: number[];
        provider: string;
    };
}
/**
 * Local 검색 서비스
 * searchLocal 메서드의 각 단계를 메서드로 분리
 */
export declare class LocalSearchService {
    private db;
    private cacheService;
    private nHopSearchStrategy;
    private queryFilterStrategy;
    private fallbackStrategy;
    constructor(cacheService: IAnchorCacheService, nHopSearchStrategy: INHopSearchStrategy, queryFilterStrategy: IQueryFilterStrategy, fallbackStrategy: IFallbackStrategy);
    /**
     * 데이터베이스 설정
     */
    setDatabase(db: Database.Database): void;
    /**
     * 앵커 정보 및 임베딩 조회
     */
    getAnchorWithEmbedding(agentId: string, slot: AnchorSlot): Promise<AnchorWithEmbedding | null>;
    /**
     * N-hop 검색 수행
     */
    performNHopSearch(anchorEmbedding: number[], provider: string, anchorMemoryId: string, threshold: number, maxHops: number, limit: number, useRelations?: boolean): Promise<NHopSearchResult[]>;
    /**
     * 쿼리 필터링 적용
     */
    applyQueryFilter(query: string | undefined, results: NHopSearchResult[], provider: string): Promise<NHopSearchResult[]>;
    /**
     * Fallback 처리
     */
    handleFallback(query: string | undefined, localResults: Array<{
        id: string;
        content: string;
        type: string;
        similarity: number;
        hop_distance: number;
        importance: number;
        created_at: string;
        tags?: string[];
    }>, minResults: number, options: SearchOptions | undefined, startTime: number): Promise<{
        items: Array<{
            id: string;
            content: string;
            type: string;
            similarity: number;
            hop_distance: number;
            importance: number;
            created_at: string;
            tags?: string[];
        }>;
        totalCount: number;
        fallbackUsed: boolean;
    }>;
}
//# sourceMappingURL=local-search-service.d.ts.map