/** * Elasticsearch Text Store (FUTURE FEATURE) * * This is a stub implementation for future Elasticsearch integration. * When implemented, it will provide: * - Distributed full-text search * - Advanced query DSL * - Synonym support via synonym filters * - Scalable indexing for large codebases * * IMPLEMENTATION STATUS: Stub - Not yet functional * * To implement: * 1. Install @elastic/elasticsearch package * 2. Set up Docker Compose with Elasticsearch * 3. Implement the methods below * * Docker Compose example: * ```yaml * services: * elasticsearch: * image: docker.elastic.co/elasticsearch/elasticsearch:8.11.0 * environment: * - discovery.type=single-node * - xpack.security.enabled=false * - "ES_JAVA_OPTS=-Xms512m -Xmx512m" * ports: * - "9200:9200" * volumes: * - elasticsearch-data:/usr/share/elasticsearch/data * * volumes: * elasticsearch-data: * ``` */ import { ITextStore, TextDocument, TextSearchResult, Synonym } from '../interfaces'; export interface ElasticsearchConfig { node: string; auth?: { username: string; password: string; }; indexPrefix?: string; } export declare class ElasticsearchTextStore implements ITextStore { private config; constructor(config: ElasticsearchConfig); index(_doc: TextDocument): Promise; indexMany(_docs: TextDocument[]): Promise; search(_query: string, _projectId: string, _limit?: number): Promise; searchWithSynonyms(_query: string, _projectId: string, _limit?: number): Promise; remove(_id: string): Promise; removeByProject(_projectId: string): Promise; addSynonym(_term: string, _synonyms: string[], _projectId?: string): Promise; removeSynonym(_term: string, _projectId?: string): Promise; getSynonyms(_projectId?: string): Promise; clearSynonyms(_projectId?: string): Promise; count(_projectId: string): Promise; flush(): Promise; close(): Promise; /** * Future: Initialize Elasticsearch indices with proper mappings * * Index mapping would include: * - content: text with custom analyzer for code * - filePath: keyword + text for both exact and fuzzy matching * - projectId: keyword for filtering * - metadata: object for flexible metadata * * Custom analyzer would include: * - camelCase tokenizer * - lowercase filter * - asciifolding filter * - synonym filter (configurable) */ initializeIndices(): Promise; /** * Future: Create the index mapping for code search */ static getIndexMapping(): object; } //# sourceMappingURL=elasticsearch-text-store.d.ts.map