diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-10-28 10:43:14 +0200 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2022-10-28 10:43:14 +0200 |
commit | d3f66edbd84a6b462b08ca2e260a1dbb1ba4b730 (patch) | |
tree | c319a9b6e078c696d04bbef85c600d1b405ee25b | |
parent | Frontend: Html: Set footer at the bottom of the page (diff) | |
download | OSSE-d3f66edbd84a6b462b08ca2e260a1dbb1ba4b730.tar.gz OSSE-d3f66edbd84a6b462b08ca2e260a1dbb1ba4b730.tar.bz2 OSSE-d3f66edbd84a6b462b08ca2e260a1dbb1ba4b730.zip |
Misc: Add TODOs
-rw-r--r-- | crawler/src/main.rs | 1 | ||||
-rw-r--r-- | frontend/src/main.rs | 2 | ||||
-rw-r--r-- | indexer/src/main.rs | 1 |
3 files changed, 3 insertions, 1 deletions
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 { </div> </nav> </header> + //SET AT MIDDLE OF VIEWPORT IF NO SEARCHING AND TOP 25% IF SEARCHING <main class="container"> <div class="row"> <div class="col"> 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<AppState>, term: web::Path<String>) -> impl Resp let query: Vec<&str> = term.split(' ').collect(); let database = data.database.lock().unwrap(); + //percentage of valid words let mut valid_results: Option<HashSet<CrawledResource>> = None; for w in query { let curr_word_results = match search_word_in_db(&database, w) { |