From efc3371b6fbe6e795dd3edc63428647b9def0d68 Mon Sep 17 00:00:00 2001 From: Louis Dureuil Date: Thu, 8 Jun 2023 16:52:00 +0200 Subject: [PATCH] use linear scale in search --- meilisearch/src/search.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/meilisearch/src/search.rs b/meilisearch/src/search.rs index 68180446b..8f2a27570 100644 --- a/meilisearch/src/search.rs +++ b/meilisearch/src/search.rs @@ -212,7 +212,7 @@ pub struct SearchHit { #[serde(rename = "_rankingScoreDetails", skip_serializing_if = "Option::is_none")] pub ranking_score_details: Option>, #[serde(rename = "_rankingScore")] - pub ranking_score: f64, + pub ranking_score: u64, } #[derive(Serialize, Debug, Clone, PartialEq)] @@ -428,7 +428,7 @@ pub fn perform_search( insert_geo_distance(sort, &mut document); } - let ranking_score = ScoreDetails::global_score(score.iter()); + let ranking_score = ScoreDetails::global_score_linear_scale(score.iter()); let ranking_score_details = query.show_ranking_score_details.then(|| ScoreDetails::to_json_map(score.iter()));