feat: manual entity creation

chore: clippy
This commit is contained in:
Per Stark
2025-10-15 21:00:17 +02:00
parent 2964f1a5a5
commit 35ff4e1464
14 changed files with 653 additions and 43 deletions

View File

@@ -305,9 +305,7 @@ async fn enrich_entities_from_graph(
}
let existing_graph = entry.scores.graph.unwrap_or(f32::MIN);
if graph_score > existing_graph {
entry.scores.graph = Some(graph_score);
} else if entry.scores.graph.is_none() {
if graph_score > existing_graph || entry.scores.graph.is_none() {
entry.scores.graph = Some(graph_score);
}

View File

@@ -68,7 +68,7 @@ impl Default for FusionWeights {
}
pub fn clamp_unit(value: f32) -> f32 {
value.max(0.0).min(1.0)
value.clamp(0.0, 1.0)
}
pub fn distance_to_similarity(distance: f32) -> f32 {