]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/SearchDescription.php
Merge remote-tracking branch 'upstream/master'
[nominatim.git] / lib / SearchDescription.php
index 1e1955c249a7e8a498a9c1d92d4bc08991fbf6b1..63241003097d235a16b296f4dfd9d8a514e3a83b 100644 (file)
@@ -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++;