/** * @nahisaho/yata-scale - Index Manager * * Manages all indexes for a shard */ import { type Result } from 'neverthrow'; import type { IndexConfig, IndexStats, Entity, Relationship } from '../types.js'; import { IndexError, IndexNotFoundError } from '../errors.js'; import { GraphIndex } from './GraphIndex.js'; import { BloomFilter } from './BloomFilter.js'; /** * Index manager for coordinating multiple indexes */ export declare class IndexManager { private indexes; private entityIndex; private bloomFilter; private graphIndex; constructor(); /** * Create a new index */ createIndex(config: IndexConfig): Result; /** * Create index by type */ private createIndexByType; /** * Drop an index */ dropIndex(name: string): Result; /** * Index an entity */ indexEntity(entity: Entity): void; /** * Index entity in a custom index */ private indexEntityInCustomIndex; /** * Remove entity from indexes */ removeEntity(entityId: string): void; /** * Remove entity from custom index */ private removeEntityFromCustomIndex; /** * Index a relationship */ indexRelationship(relationship: Relationship): void; /** * Remove a relationship from indexes */ removeRelationship(relationshipId: string): void; /** * Check if entity might exist (using bloom filter) */ mightExist(entityId: string): boolean; /** * Get entity by ID */ getEntity(entityId: string): Entity | undefined; /** * Search by attribute using B+Tree index */ searchByAttribute(indexName: string, value: string): Result; /** * Full-text search */ searchFullText(indexName: string, query: string, limit?: number): Result; /** * Get graph index */ getGraphIndex(): GraphIndex; /** * Get bloom filter */ getBloomFilter(): BloomFilter; /** * Extract key from entity for indexing */ private extractKey; /** * Extract text content for full-text indexing */ private extractTextContent; /** * Get all index statistics */ getAllStats(): IndexStats[]; /** * Clear all indexes */ clear(): void; /** * Get entity count */ get entityCount(): number; /** * Get relationship count */ get relationshipCount(): number; } //# sourceMappingURL=IndexManager.d.ts.map