Skip to content

web search done right

no need to create 'warc_files' folder when downloading anymore

Mikkel Denker0ac07ab3b486
diff --git a/core/src/entrypoint/indexer.rs b/core/src/entrypoint/indexer.rs
index 1188aa1e..99eede9b 100644
--- a/core/src/entrypoint/indexer.rs
+++ b/core/src/entrypoint/indexer.rs
@@ -107,7 +107,7 @@ pub fn process_job(job: &Job, worker: &IndexingWorker) -> Index {
let source: config::WarcSource = job.source_config.clone().into();
- let warc_files = download_all_warc_files(&job.warc_paths, &source, &job.base_path);
+ let warc_files = download_all_warc_files(&job.warc_paths, &source);
pin!(warc_files);
let current_timestamp = Utc::now().timestamp().max(0) as usize;
diff --git a/core/src/entrypoint/mod.rs b/core/src/entrypoint/mod.rs
index cf6c4666..e33a4725 100644
--- a/core/src/entrypoint/mod.rs
+++ b/core/src/entrypoint/mod.rs
@@ -29,8 +29,6 @@ pub mod search_server;
mod webgraph;
pub mod webgraph_server;
-use std::path::Path;
-
pub use centrality::Centrality;
pub use entity::EntityIndexer;
pub use indexer::Indexer;
@@ -42,14 +40,7 @@ use crate::{config, warc::WarcFile};
fn download_all_warc_files<'a>(
warc_paths: &'a [String],
source: &'a config::WarcSource,
- base_path: &'a str,
) -> impl Iterator<Item = WarcFile> + 'a {
- let download_path = Path::new(base_path).join("warc_files");
-
- if !download_path.exists() {
- std::fs::create_dir_all(&download_path).unwrap();
- }
-
let warc_paths: Vec<_> = warc_paths
.iter()
.map(|warc_path| warc_path.to_string())
diff --git a/core/src/entrypoint/webgraph.rs b/core/src/entrypoint/webgraph.rs
index 4c55790d..a4da11ae 100644
--- a/core/src/entrypoint/webgraph.rs
+++ b/core/src/entrypoint/webgraph.rs
@@ -89,7 +89,7 @@ impl WebgraphWorker {
let source = WarcSource::from(job.config.clone());
- let warc_files = download_all_warc_files(&job.warc_paths, &source, &job.graph_base_path);
+ let warc_files = download_all_warc_files(&job.warc_paths, &source);
pin!(warc_files);
for file in warc_files.by_ref() {