From: Sarah Hoffmann Date: Tue, 3 Nov 2020 19:14:37 +0000 (+0100) Subject: put a heavy penalty on full word searches in address X-Git-Tag: deploy~199 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/c7eb4e2c7373d64b440b3acf2186545e6a593a59 put a heavy penalty on full word searches in address Experimentally downvote all searches with full words. They tend to move down the actual good interpretation with partial searches. --- diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index ad404528..52d15976 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -283,7 +283,7 @@ class SearchDescription if (!empty($this->aName) || !($bFirstPhrase || $sPhraseType == '')) { if (($sPhraseType == '' || !$bFirstPhrase) && !$bHasPartial) { $oSearch = clone $this; - $oSearch->iSearchRank += 2; + $oSearch->iSearchRank += 5; $oSearch->aAddress[$iWordID] = $iWordID; $aNewSearches[] = $oSearch; } else {