diff --git a/indexer/indexer_tests/search_string_utils_test.cpp b/indexer/indexer_tests/search_string_utils_test.cpp index b5e24a972c..446de30593 100644 --- a/indexer/indexer_tests/search_string_utils_test.cpp +++ b/indexer/indexer_tests/search_string_utils_test.cpp @@ -229,7 +229,7 @@ UNIT_TEST(Street_TokensFilter) } { - List expected = {{"набережная", 1}, {"проспект", 2}}; + List expected = {{"набережная", 1}}; List actual; Utf8StreetTokensFilter filter(actual); @@ -241,7 +241,8 @@ UNIT_TEST(Street_TokensFilter) } { - List expected = {{"ленинский", 0}, {"пропект", 1}}; + List expectedWithMP = {{"ленинский", 0}}; + List expectedWithoutMP = {{"ленинский", 0}, {"пропект", 1}}; List actualWithMisprints; List actualWithoutMisprints; @@ -253,8 +254,8 @@ UNIT_TEST(Street_TokensFilter) filterWithMisprints.Put("пропект", false /* isPrefix */, 1 /* tag */); filterWithoutMisprints.Put("пропект", false /* isPrefix */, 1 /* tag */); - TEST_EQUAL(expected, actualWithMisprints, ()); - TEST_EQUAL(expected, actualWithoutMisprints, ()); + TEST_EQUAL(expectedWithMP, actualWithMisprints, ()); + TEST_EQUAL(expectedWithoutMP, actualWithoutMisprints, ()); } { diff --git a/indexer/search_string_utils.cpp b/indexer/search_string_utils.cpp index 5e07f0a3dc..9cbc306ab1 100644 --- a/indexer/search_string_utils.cpp +++ b/indexer/search_string_utils.cpp @@ -330,13 +330,13 @@ private: char const * affics[] = { // Russian - Русский - "улица", "ул", + "улица", "ул", "проспект", // English - English "street", "st", "road", "rd", "drive", "dr", "lane", "ln", "avenue", "av", "ave", // Belarusian - Беларуская мова - "вуліца", "вул", + "вуліца", "вул", "праспект", // Arabic "شارع", @@ -345,13 +345,13 @@ private: "փողոց", // Catalan language (Barcelona, Valencia, ...) - "carrer", + "carrer", "avinguda", // Croatian - Hrvatski "ulica", // Also common used transcription from RU // French - Français - "rue", + "rue", "avenue", // Georgia "ქუჩა", @@ -366,7 +366,7 @@ private: "jalan", // Italian - Italiano - "via", + "via", "viale", "piazza", /// @todo Also expect that this synonyms should be in categories.txt list, but we dont support lt, lv langs now. /// @{ @@ -383,13 +383,13 @@ private: "strada", // Spanish - Español - "calle", "avenida", + "calle", "avenida", "plaza", // Turkish - Türkçe "sokağı", "sokak", "sk", // Ukrainian - Українська - "вулиця", "вул", + "вулиця", "вул", "проспект", // Vietnamese - Tiếng Việt "đường", 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 e4e84b22ff..58e520fe57 100644 --- a/search/search_quality/search_quality_tests/real_mwm_tests.cpp +++ b/search/search_quality/search_quality_tests/real_mwm_tests.cpp @@ -1007,6 +1007,22 @@ UNIT_CLASS_TEST(MwmTestsFixture, Streets_Rank) // - "Béke utca" EqualClassifType(Range(results, 0, kResultsCount), GetClassifTypes({{"highway"}, {"amenity", "fast_food"}})); } + + { + // Minsk + ms::LatLon const center(53.91058, 27.54519); + SetViewportAndLoadMaps(center); + auto request = MakeRequest("победител", "ru"); + auto const & results = request->Results(); + TEST_GREATER(results.size(), kTopPoiResultsCount, ()); + + // First result is a viewpoint (attraction). + EqualClassifType(Range(results, 0, 1), GetClassifTypes({{"tourism", "viewpoint"}})); + // And next are the streets. + Range const range(results, 1, 4); + EqualClassifType(range, GetClassifTypes({{"highway"}})); + TEST_LESS(SortedByDistance(range, center).first, 500, ()); + } } // https://github.com/organicmaps/organicmaps/issues/5756