]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/SearchDescription.php
do not allow importance to become 0
[nominatim.git] / lib / SearchDescription.php
index 5431b3eb957907417d38f130a3dd91abeb6bfc6f..6b66e5a552342724a03aee2d79d45768c24981f8 100644 (file)
@@ -675,7 +675,7 @@ class SearchDescription
         if ($this->sHouseNumber) {
             $sImportanceSQL = '- abs(26 - address_rank) + 3';
         } else {
-            $sImportanceSQL = '(CASE WHEN importance = 0 OR importance IS NULL THEN 0.75-(search_rank::float/40) ELSE importance END)';
+            $sImportanceSQL = '(CASE WHEN importance = 0 OR importance IS NULL THEN 0.75001-(search_rank::float/40) ELSE importance END)';
         }
         $sImportanceSQL .= $this->oContext->viewboxImportanceSQL('centroid');
         $aOrder[] = "$sImportanceSQL DESC";