From d3f66edbd84a6b462b08ca2e260a1dbb1ba4b730 Mon Sep 17 00:00:00 2001 From: Baitinq Date: Fri, 28 Oct 2022 10:43:14 +0200 Subject: Misc: Add TODOs --- crawler/src/main.rs | 1 - frontend/src/main.rs | 2 ++ indexer/src/main.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/crawler/src/main.rs b/crawler/src/main.rs index ef749e0..efdb033 100644 --- a/crawler/src/main.rs +++ b/crawler/src/main.rs @@ -46,7 +46,6 @@ async fn crawler(http_client: Client, root_urls: Vec<&str>) { //DONT FORGET ENUMS //CAN WE DO UNWRAP OR RETURN or lambda //HOW TF DOES CRAWLER WORK. DOESNT QUEUE FILL. LOTS OF WAITING THINGS?? - //REMOVE ALL String::from, do .to_string() //dbg!("Content: {:?}", &content); dbg!("Next urls: {:?}", &crawled_urls); diff --git a/frontend/src/main.rs b/frontend/src/main.rs index a492636..27c30da 100644 --- a/frontend/src/main.rs +++ b/frontend/src/main.rs @@ -97,6 +97,7 @@ fn osse() -> Html { let cloned_state = cloned_state.clone(); wasm_bindgen_futures::spawn_local(async move { let mut state = cloned_state.deref().clone(); + //TODO: what if its on another host let endpoint = format!("http://127.0.0.1:4444/search/{}", &state.search_query); let fetched_results = Request::get(endpoint.as_str()).send().await.unwrap(); @@ -132,6 +133,7 @@ fn osse() -> Html { + //SET AT MIDDLE OF VIEWPORT IF NO SEARCHING AND TOP 25% IF SEARCHING
diff --git a/indexer/src/main.rs b/indexer/src/main.rs index d1ad867..8f12528 100644 --- a/indexer/src/main.rs +++ b/indexer/src/main.rs @@ -107,6 +107,7 @@ async fn search(data: web::Data, term: web::Path) -> impl Resp let query: Vec<&str> = term.split(' ').collect(); let database = data.database.lock().unwrap(); + //percentage of valid words let mut valid_results: Option> = None; for w in query { let curr_word_results = match search_word_in_db(&database, w) { -- cgit 1.4.1