]> git.openstreetmap.org Git - nominatim.git/commitdiff
increase search rank per address term
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 5 Nov 2017 11:05:56 +0000 (12:05 +0100)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 5 Nov 2017 11:05:56 +0000 (12:05 +0100)
Gives preference to special terms like postcode and housenumber.

lib/SearchDescription.php

index bf45dadaf41adad4f1d586b56a3674baa9590388..d78bf975d3c7f07702f6303f1c366a9af78b8bf4 100644 (file)
@@ -326,7 +326,7 @@ class SearchDescription
         ) {
             if ($aSearchTerm['search_name_count'] + 1 < CONST_Max_Word_Frequency) {
                 $oSearch = clone $this;
-                $oSearch->iSearchRank++;
+                $oSearch->iSearchRank += 2;
                 $oSearch->aAddress[$iWordID] = $iWordID;
                 $aNewSearches[] = $oSearch;
             } else {