]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/lib.php
calculate search position based to 'importance' rather than address rank
[nominatim.git] / lib / lib.php
index 8dc2570cd23f06150e8df84db47ce9f85472f3ea..d36e64720e0ef485d82ad42c22ca508d7ed1493a 100644 (file)
@@ -40,6 +40,9 @@
 
        function byImportance($a, $b)
        {
+/*
+               if ($a['importance'] != $b['importance'])
+                       return ($a['importance'] > $b['importance']?-1:1);
                if ($a['aPointPolygon']['numfeatures'] != $b['aPointPolygon']['numfeatures'])
                        return ($a['aPointPolygon']['numfeatures'] > $b['aPointPolygon']['numfeatures']?-1:1);
                if ($a['aPointPolygon']['area'] != $b['aPointPolygon']['area'])
@@ -48,8 +51,7 @@
 //                     return ($a['levenshtein'] < $b['levenshtein']?-1:1);
                if ($a['rank_search'] != $b['rank_search'])
                        return ($a['rank_search'] < $b['rank_search']?-1:1);
-               if ($a['importance'] != $b['importance'])
-                       return ($a['importance'] < $b['importance']?-1:1);
+*/
                return ($a['foundorder'] < $b['foundorder']?-1:1);
        }