From: Sarah Hoffmann Date: Thu, 11 Mar 2021 19:42:37 +0000 (+0100) Subject: avoid multi-term partials in names X-Git-Tag: v3.7.0~19^2~2 X-Git-Url: https://git.openstreetmap.org./nominatim.git/commitdiff_plain/3933fc3ad335df5b6aba2f4f06eeff3127f16a0d avoid multi-term partials in names Names are either full words or single-word partial names. Searching for multi-word partials yields exactly the same result as with full words. --- diff --git a/lib-php/SearchDescription.php b/lib-php/SearchDescription.php index 94cadda3..cde21f82 100644 --- a/lib-php/SearchDescription.php +++ b/lib-php/SearchDescription.php @@ -356,6 +356,7 @@ class SearchDescription if ((!$this->sPostcode && !$this->aAddress && !$this->aAddressNonSearch) && ((empty($this->aName) && empty($this->aNameNonSearch)) || $this->iNamePhrase == $iPhrase) + && strpos($sToken, ' ') === false ) { $oSearch = clone $this; $oSearch->iSearchRank++;