diff --git a/indexer/ftypes_matcher.cpp b/indexer/ftypes_matcher.cpp index 8c065b6990..ecf1926bb2 100644 --- a/indexer/ftypes_matcher.cpp +++ b/indexer/ftypes_matcher.cpp @@ -346,16 +346,16 @@ IsWayChecker::IsWayChecker() {"primary", Regular}, {"primary_link", Regular}, {"residential", Residential}, - {"road", Outdoor}, + {"road", Minors}, {"secondary", Regular}, {"secondary_link",Regular}, - {"service", Residential}, + {"service", Minors}, {"tertiary", Regular}, {"tertiary_link", Regular}, {"track", Outdoor}, {"trunk", Motorway}, {"trunk_link", Motorway}, - {"unclassified", Outdoor}, + {"unclassified", Minors}, }; m_ranks.Reserve(std::size(types)); diff --git a/indexer/ftypes_matcher.hpp b/indexer/ftypes_matcher.hpp index 65eb507c9f..c4611a541b 100644 --- a/indexer/ftypes_matcher.hpp +++ b/indexer/ftypes_matcher.hpp @@ -222,6 +222,7 @@ public: Pedestrian, Cycleway, Outdoor, + Minors, Residential, Regular, Motorway, diff --git a/search/ranking_info.cpp b/search/ranking_info.cpp index 35fd65edfc..34e1ec175d 100644 --- a/search/ranking_info.cpp +++ b/search/ranking_info.cpp @@ -84,6 +84,7 @@ double constexpr kStreetType[] = { 0, // Pedestrian 0, // Cycleway 0, // Outdoor + 0.004, // Minors 0.004, // Residential 0.005, // Regular 0.006, // Motorway @@ -404,6 +405,7 @@ std::string DebugPrint(StreetType type) case StreetType::Pedestrian: return "Pedestrian"; case StreetType::Cycleway: return "Cycleway"; case StreetType::Outdoor: return "Outdoor"; + case StreetType::Minors: return "Minors"; case StreetType::Residential: return "Residential"; case StreetType::Regular: return "Regular"; case StreetType::Motorway: return "Motorway"; diff --git a/search/search_quality/search_quality_tests/real_mwm_tests.cpp b/search/search_quality/search_quality_tests/real_mwm_tests.cpp index cddf8e9360..8e8b3df0a2 100644 --- a/search/search_quality/search_quality_tests/real_mwm_tests.cpp +++ b/search/search_quality/search_quality_tests/real_mwm_tests.cpp @@ -533,7 +533,6 @@ UNIT_CLASS_TEST(MwmTestsFixture, Generic_Buildings_Rank) { auto request = MakeRequest("dia ", "en"); auto const & results = request->Results(); - LOG(LINFO, (results)); TEST_GREATER(results.size(), kTopPoiResultsCount, ()); Range const range(results); @@ -570,4 +569,21 @@ UNIT_CLASS_TEST(MwmTestsFixture, UTH_Airport) TEST(found, (results)); } +// https://github.com/organicmaps/organicmaps/issues/5186 +UNIT_CLASS_TEST(MwmTestsFixture, Milan_Streets) +{ + // Milan + ms::LatLon const center(45.46411, 9.19045); + SetViewportAndLoadMaps(center); + + auto request = MakeRequest("Via Domenichino", "it"); + auto const & results = request->Results(); + + size_t constexpr kResultsCount = 2; + TEST_GREATER(results.size(), kResultsCount, ()); + + Range const range(results, 0, kResultsCount); + TEST_LESS(SortedByDistance(range, center), 20000.0, ()); +} + } // namespace real_mwm_tests