Expand description
File indexing engine for RAGFS.
This crate provides the indexing pipeline that processes files through: extraction → chunking → embedding → storage.
§Components
IndexerService: Main service that coordinates the indexing pipelineFileWatcher: Monitors directories for file changesIndexerConfig: Configuration for the indexerIndexUpdate: Events emitted during indexing
§Example
ⓘ
use ragfs_index::{IndexerService, IndexerConfig};
let indexer = IndexerService::new(
source_path,
store,
extractors,
chunkers,
embedder,
IndexerConfig::default(),
);
// Subscribe to updates
let mut updates = indexer.subscribe();
// Start indexing
indexer.start().await?;
// Process updates
while let Ok(update) = updates.recv().await {
match update {
IndexUpdate::FileIndexed { path, chunk_count } => { /* ... */ }
IndexUpdate::FileError { path, error } => { /* ... */ }
_ => {}
}
}Re-exports§
pub use indexer::IndexUpdate;pub use indexer::IndexerConfig;pub use indexer::IndexerService;pub use watcher::FileWatcher;