Skip to content

web search done right

increase coefficient for update_timestamp to show more recent articles from live index

Mikkel Denkere16e3532498f
diff --git a/crates/core/src/ranking/signals/core/non_text.rs b/crates/core/src/ranking/signals/core/non_text.rs
index ef89c0f7..e4f7498a 100644
--- a/crates/core/src/ranking/signals/core/non_text.rs
+++ b/crates/core/src/ranking/signals/core/non_text.rs
@@ -42,8 +42,8 @@ fn score_timestamp(page_timestamp: usize, signal_computer: &SignalComputer) -> f
}
pub fn time_cache_calculation(hours_since_update: f64) -> f64 {
- const SMOOTHING_FACTOR: f64 = 24.0 * 3.0; // half life of 3 days
- SMOOTHING_FACTOR / (hours_since_update + SMOOTHING_FACTOR)
+ const HALF_LIFE: f64 = 24.0 * 3.0; // half life of 3 days
+ HALF_LIFE / (hours_since_update + HALF_LIFE)
}
#[inline]
@@ -398,7 +398,7 @@ impl CoreSignal for FetchTimeMs {
pub struct UpdateTimestamp;
impl CoreSignal for UpdateTimestamp {
fn default_coefficient(&self) -> f64 {
- 0.001
+ 0.5
}
fn as_field(&self) -> Option<Field> {