From: Sarah Hoffmann Date: Mon, 10 Jun 2019 21:35:37 +0000 (+0200) Subject: increase weight for country tokens X-Git-Tag: deploy~275 X-Git-Url: https://git.openstreetmap.org/nominatim.git/commitdiff_plain/0176cbd25323447163193114ca15ed83d71db36a increase weight for country tokens See if it solves issues with country codes vs. US state codes. --- diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 506d4202..47676d59 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -187,7 +187,7 @@ class SearchDescription ) { if (!$this->sCountryCode) { $oSearch = clone $this; - $oSearch->iSearchRank++; + $oSearch->iSearchRank += 2; $oSearch->sCountryCode = $oSearchTerm->sCountryCode; // Country is almost always at the end of the string // - increase score for finding it anywhere else (optimisation)