Skip to content

web search done right

create segments folder when graph is created

Mikkel Denker8478595b723b
diff --git a/configs/frontend.toml b/configs/frontend.toml
index 11006110..3abc2979 100644
--- a/configs/frontend.toml
+++ b/configs/frontend.toml
@@ -1,3 +1,4 @@
queries_csv_path = "data/queries_us.csv"
host = "0.0.0.0:3000"
-search_servers = [["0.0.0.0:3001"]]
\ No newline at end of file
+search_servers = [["0.0.0.0:3001"]]
+crossencoder_model_path = "data/cross_encoder"
\ No newline at end of file
diff --git a/core/src/webgraph/mod.rs b/core/src/webgraph/mod.rs
index 9b5f16e8..7d37975a 100644
--- a/core/src/webgraph/mod.rs
+++ b/core/src/webgraph/mod.rs
@@ -321,6 +321,7 @@ impl<S: Store> Webgraph<S> {
fs::create_dir_all(&path).unwrap();
let meta = Self::meta(&path);
+ fs::create_dir_all(path.as_ref().join("segments")).unwrap();
let mut segments = Vec::new();
for segment in &meta.comitted_segments {
segments.push(Segment::open(
@@ -342,10 +343,11 @@ impl<S: Store> Webgraph<S> {
}
fn open_read_only<P: AsRef<Path>>(path: P) -> Self {
+ fs::create_dir_all(&path).unwrap();
let meta = Self::meta(&path);
+ fs::create_dir_all(path.as_ref().join("segments")).unwrap();
let mut segments = Vec::new();
-
for segment in &meta.comitted_segments {
segments.push(Segment::open(
path.as_ref().join("segments").join(segment),