web search done right
set webgraph on api searcher so like/dislike works
Mikkel Denker8b21c3c085ed
diff --git a/crates/core/src/api/mod.rs b/crates/core/src/api/mod.rsindex 841b710c..f7d059ed 100644--- a/crates/core/src/api/mod.rs+++ b/crates/core/src/api/mod.rs@@ -233,6 +233,8 @@ pub async fn router(let host_webgraph = Arc::new(host_webgraph);let page_webgraph = Arc::new(page_webgraph);+ searcher = searcher.with_webgraph(Arc::clone(&host_webgraph));+let similar_hosts =SimilarHostsFinder::new(Arc::clone(&host_webgraph), config.max_similar_hosts);diff --git a/crates/core/src/ranking/pipeline/mod.rs b/crates/core/src/ranking/pipeline/mod.rsindex ad3e3d32..e65b64a6 100644--- a/crates/core/src/ranking/pipeline/mod.rs+++ b/crates/core/src/ranking/pipeline/mod.rs@@ -34,6 +34,8 @@ mod stages;pub use scorers::{ReRanker, Recall, Scorer};pub use stages::{LocalRecallRankingWebpage, PrecisionRankingWebpage, RecallRankingWebpage};+const INBOUND_SIMILARITY_SMOOTHING: f64 = 8.0;+pub trait RankableWebpage: collector::Doc + Send + Sync {fn set_score(&mut self, score: f64);fn boost(&self) -> Option<f64>;@@ -109,7 +111,7 @@ impl<T: RankableWebpage> RankingStage<T> {.get(InboundSimilarity.into()).copied().unwrap_or(0.0)- .add(1.0)+ .add(INBOUND_SIMILARITY_SMOOTHING)* coeff* model.predict(signals)}