hikma-engine
Version:
Code Knowledge Graph Indexer - A sophisticated TypeScript-based indexer that transforms Git repositories into multi-dimensional knowledge stores for AI agents
70 lines • 2.22 kB
TypeScript
/**
* @file Search controllers for all search endpoint types.
* Handles semantic, structural, git, hybrid, and comprehensive search requests.
*/
import { Request, Response, NextFunction } from 'express';
import { ConfigManager } from '../../config';
/**
* Search controller class handling all search endpoints.
*/
export declare class SearchController {
private searchService;
private cacheService;
private resultEnhancer;
private sqliteClient;
constructor(config: ConfigManager);
/**
* Initialize the search service.
*/
initialize(): Promise<void>;
/**
* Task 4: Semantic search endpoint.
* GET /api/v1/search/semantic
*/
semanticSearch(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
* Task 5: Structural search endpoint.
* GET /api/v1/search/structure
*/
structuralSearch(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
* Task 6: Git history search endpoint.
* GET /api/v1/search/git
*/
gitSearch(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
* Task 7: Hybrid search endpoint.
* GET /api/v1/search/hybrid
*/
hybridSearch(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
* Task 8: Comprehensive search endpoint.
* GET /api/v1/search/comprehensive
*/
comprehensiveSearch(req: Request, res: Response, next: NextFunction): Promise<void>;
/**
* Helper method to identify which search dimensions matched for a result.
*/
private identifySearchDimensions;
/**
* Generate facets from search results.
*/
private generateFacets;
/**
* Generate search suggestions based on results.
*/
private generateSuggestions;
/**
* Categorize results by type and search dimension.
*/
private categorizeResults;
/**
* Helper method to get affected files for a commit.
*/
private getCommitAffectedFiles;
}
/**
* Create and export search controller instance.
*/
export declare function createSearchController(config: ConfigManager): SearchController;
//# sourceMappingURL=search-controller.d.ts.map