diff --git a/search/ranking_utils.cpp b/search/ranking_utils.cpp index f8e5e1632e..b7ab0819d7 100644 --- a/search/ranking_utils.cpp +++ b/search/ranking_utils.cpp @@ -112,9 +112,9 @@ bool IsStopWord(UniString const & s) // Don't want to put _full_ stopwords list, not to break current ranking. // Only 2-letters and the most common. char const * arr[] = { - "a", // English + "a", "s", // English "am", "im", "an", // German - "de", "di", "da", "la", "le", // French, Spanish, Italian + "d", "de", "di", "da", "la", "le", // French, Spanish, Italian "и", "я" // Cyrillic }; for (char const * s : arr) 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 b119a39064..f739647272 100644 --- a/search/search_quality/search_quality_tests/real_mwm_tests.cpp +++ b/search/search_quality/search_quality_tests/real_mwm_tests.cpp @@ -448,4 +448,18 @@ UNIT_CLASS_TEST(MwmTestsFixture, Hawaii_Address) HasAddress(range, "Ululani Street", "1000"); } +// https://github.com/organicmaps/organicmaps/issues/3712 +UNIT_CLASS_TEST(MwmTestsFixture, French_StopWord_Category) +{ + // Metz + ms::LatLon const center(49.12163, 6.17075); + SetViewportAndLoadMaps(center); + + auto request = MakeRequest("Bouche d'incendie", "fr"); + auto const & results = request->Results(); + + Range const range(results, 0, kTopPoiResultsCount); + EqualClassifType(range, GetClassifTypes({{"emergency", "fire_hydrant"}})); + TEST_LESS(SortedByDistance(range, center), 1000.0, ()); +} } // namespace real_mwm_tests