X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/2f4342810d4bf1d12cb6064468ad8dcd9a7f62c3..4ad88188095a3ce19c8fd6f5449d78b5e4aa82d4:/nominatim/api/search/db_searches.py?ds=inline diff --git a/nominatim/api/search/db_searches.py b/nominatim/api/search/db_searches.py index ba4a3995..76ff368f 100644 --- a/nominatim/api/search/db_searches.py +++ b/nominatim/api/search/db_searches.py @@ -403,6 +403,12 @@ class CountrySearch(AbstractSearch): details: SearchDetails) -> nres.SearchResults: """ Look up the country in the fallback country tables. """ + # Avoid the fallback search when this is a more search. Country results + # usually are in the first batch of results and it is not possible + # to exclude these fallbacks. + if details.excluded: + return nres.SearchResults() + t = conn.t.country_name tgrid = conn.t.country_grid