Expand description
§File Indexing and Search Service
§File: Indexing/mod.rs
§Role in Air Architecture
Provides comprehensive file indexing, search, and content analysis capabilities for the Land ecosystem, inspired by and compatible with Visual Studio Code’s search service.
§Primary Responsibility
Facade module for the Indexing service, exposing the public API for file indexing, search, and symbol extraction operations.
§Secondary Responsibilities
- Re-export public types from submodule
- Provide unified FileIndexer API
- Coordinate between indexing subsystems
§Dependencies
External Crates:
regex- Regular expression search patternsserde- Serialization for index storagetokio- Async runtime for all operationsnotify- File system watchingchrono- Timestamp management
Internal Modules:
crate::Result- Error handling typecrate::AirError- Error typescrate::ApplicationState::ApplicationState- Application statecrate::Configuration::ConfigurationManager- Configuration management
§Dependents
Indexing::FileIndexer- Main indexer implementationVine::Server::AirVinegRPCService- gRPC integration
§VSCode Integration
This service integrates with VSCode’s search and file service architecture:
- References: vs/workbench/services/search
- File Service: vs/workbench/services/files
The indexing system supports VSCode features:
- Outline View: Symbol extraction for class/function navigation
- Go to Symbol: Cross-file symbol search and lookup
- Search Integration: File content and name search with regex support
- Workspace Search: Multi-workspace index sharing
§TODO
- Implement full ripgrep integration for ultra-fast text search
- Add project-level search with workspace awareness
- Implement search query caching
- Add fuzzy search with typos tolerance
- Implement search history and recent queries
- Add search result preview with context
- Implement parallel indexing for large directories
Modules§
- Background
- Background task management
- Language
- Language-specific parsing modules
- Process
- Process Module
- Scan
- Scanning functionality for file indexing
- State
- State Module
- Store
- Storage functionality for file indexing
- Watch
- File watching functionality
Structs§
- File
Indexer - File indexer implementation with comprehensive search capabilities
- Index
Result - Indexing result with statistics
- Index
Statistics - Index statistics