X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/dc3b1abfe2d06c790317bb66e51abfd9334e08f8..5781e198a72922dcc1c7eeca900285d5aa38c5e4:/lib/SearchDescription.php diff --git a/lib/SearchDescription.php b/lib/SearchDescription.php index 1e1955c2..63241003 100644 --- a/lib/SearchDescription.php +++ b/lib/SearchDescription.php @@ -344,7 +344,7 @@ class SearchDescription ) { if ($oSearchTerm->iSearchNameCount < CONST_Max_Word_Frequency) { $oSearch = clone $this; - $oSearch->iSearchRank += $oSearchTerm->iTermCount; + $oSearch->iSearchRank += $oSearchTerm->iTermCount + 1; if (empty($this->aName)) { $oSearch->iSearchRank++; } @@ -355,7 +355,7 @@ class SearchDescription $aNewSearches[] = $oSearch; } else { $oSearch = clone $this; - $oSearch->iSearchRank++; + $oSearch->iSearchRank += $oSearchTerm->iTermCount + 1; $oSearch->aAddressNonSearch[$iWordID] = $iWordID; if (!empty($aFullTokens)) { $oSearch->iSearchRank++;