mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-10-11 06:06:32 +00:00
use linear scale in search
This commit is contained in:
@@ -212,7 +212,7 @@ pub struct SearchHit {
|
||||
#[serde(rename = "_rankingScoreDetails", skip_serializing_if = "Option::is_none")]
|
||||
pub ranking_score_details: Option<serde_json::Map<String, serde_json::Value>>,
|
||||
#[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()));
|
||||
|
||||
|
Reference in New Issue
Block a user