ragfs_index/lib.rs
1//! File indexing engine for RAGFS.
2//!
3//! This crate provides the indexing pipeline that processes files through:
4//! extraction → chunking → embedding → storage.
5//!
6//! # Components
7//!
8//! - [`IndexerService`]: Main service that coordinates the indexing pipeline
9//! - [`FileWatcher`]: Monitors directories for file changes
10//! - [`IndexerConfig`]: Configuration for the indexer
11//! - [`IndexUpdate`]: Events emitted during indexing
12//!
13//! # Example
14//!
15//! ```rust,ignore
16//! use ragfs_index::{IndexerService, IndexerConfig};
17//!
18//! let indexer = IndexerService::new(
19//! source_path,
20//! store,
21//! extractors,
22//! chunkers,
23//! embedder,
24//! IndexerConfig::default(),
25//! );
26//!
27//! // Subscribe to updates
28//! let mut updates = indexer.subscribe();
29//!
30//! // Start indexing
31//! indexer.start().await?;
32//!
33//! // Process updates
34//! while let Ok(update) = updates.recv().await {
35//! match update {
36//! IndexUpdate::FileIndexed { path, chunk_count } => { /* ... */ }
37//! IndexUpdate::FileError { path, error } => { /* ... */ }
38//! _ => {}
39//! }
40//! }
41//! ```
42
43pub mod indexer;
44pub mod watcher;
45
46pub use indexer::{IndexUpdate, IndexerConfig, IndexerService};
47pub use watcher::FileWatcher;