From 561f7043b9b17bcf6dce70c8c756cca3471371c6 Mon Sep 17 00:00:00 2001 From: Viktor Govako Date: Fri, 17 Nov 2023 12:02:01 -0300 Subject: [PATCH] [search] Skip small ranks (population < 800) in scoring. Signed-off-by: Viktor Govako --- search/ranker.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/search/ranker.cpp b/search/ranker.cpp index c3e48c25fc..4980ecf180 100644 --- a/search/ranker.cpp +++ b/search/ranker.cpp @@ -608,6 +608,10 @@ private: uint8_t NormalizeRank(uint8_t rank, Model::Type type, m2::PointD const & center, string const & country, bool isCapital, bool isRelaxed) { + // Do not prioritize objects with population < 800. Same as RankToPopulation(rank) < 800, but faster. + if (rank <= 70) + return 0; + if (isRelaxed) rank /= 5.0;