Crate ragfs_index

Crate ragfs_index 

Source
Expand description

File indexing engine for RAGFS.

This crate provides the indexing pipeline that processes files through: extraction → chunking → embedding → storage.

§Components

§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;

Modules§

indexer
Main indexing service.
watcher
File system watcher for detecting changes.