quick_search/src/main.rs

37 lines
867 B
Rust
Raw Normal View History

use std::sync::Arc;
use dioxus::prelude::*;
2024-06-10 12:45:33 -04:00
mod frontend;
mod file_handling;
mod document_extraction;
mod indexing;
2025-09-11 14:08:46 -04:00
mod config;
2024-06-10 12:45:33 -04:00
fn main() {
launch(app);
}
fn app() -> Element {
2025-09-11 14:08:46 -04:00
let config = match config::Config::load() {
Ok(config) => config,
Err(e) => {
eprintln!("Failed to load config: {}", e);
return rsx! { div { "Failed to load configuration" } };
}
};
let indexing_service = Arc::new(indexing::IndexingService::new());
rsx! {
frontend::App {
2025-09-11 14:08:46 -04:00
indexing_service: indexing_service,
config: config
}
}
}
2024-06-10 13:56:01 -04:00
2024-06-10 18:16:28 -04:00
/*
SELECT name, hash, count(*) as cnt FROM files GROUP BY hash ORDER BY cnt DESC;
SELECT name, path, text, snippet(searchabletext, 2 , "<b>", "</b>", "...", 64) as "snip" FROM searchabletext WHERE text MATCH 'Terrasound' LIMIT 100;
*/