From: Sarah Hoffmann Date: Sun, 17 Dec 2017 15:00:44 +0000 (+0100) Subject: Give higher penalty to partial search terms X-Git-Tag: v3.1.0~15 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/b94229fb8eeb75cd7799b80539c2d4b525f43442?hp=637c5c2936a54e207a540ef0444b96a2fc0c1a80 Give higher penalty to partial search terms Avoids that the interpreation of a term as partial term is ranked higher than as a special term like postcode or house number. Fixes #847. --- diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index bf45dada..60d74173 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -360,7 +360,7 @@ class SearchDescription && (!sizeof($this->aName) || $this->iNamePhrase == $iPhrase) ) { $oSearch = clone $this; - $oSearch->iSearchRank++; + $oSearch->iSearchRank += 2; if (!sizeof($this->aName)) { $oSearch->iSearchRank += 1; }