]> git.openstreetmap.org Git - nominatim.git/blobdiff - lib/DebugHtml.php
adapt test results to new ranking
[nominatim.git] / lib / DebugHtml.php
index 0f5af241022c9fd8b5252e99635719b6cab85ce7..98da8794055c644e23fbb90ffdbbc6d3d5b45f8e 100644 (file)
@@ -71,6 +71,21 @@ class Debug
         echo "</table>\n";
     }
 
+    public static function printGroupedSearch($aSearches, $aWordsIDs)
+    {
+        echo '<table border="1">';
+        echo '<tr><th>rank</th><th>Name Tokens</th><th>Name Not</th>';
+        echo '<th>Address Tokens</th><th>Address Not</th>';
+        echo '<th>country</th><th>operator</th>';
+        echo '<th>class</th><th>type</th><th>postcode</th><th>housenumber</th></tr>';
+        foreach ($aSearches as $iRank => $aRankedSet) {
+            foreach ($aRankedSet as $aRow) {
+                $aRow->dumpAsHtmlTableRow($aWordsIDs);
+            }
+        }
+        echo '</table>';
+    }
+
     public static function printGroupTable($sHeading, $aVar)
     {
         echo '<b>'.$sHeading.":</b>\n";
@@ -138,6 +153,10 @@ class Debug
                     $sPre = ', ';
                 }
             }
+        } elseif (is_object($mVar) && method_exists($mVar, 'debugInfo')) {
+            Debug::outputVar($mVar->debugInfo(), $sPreNL);
+        } elseif (is_a($mVar, 'stdClass')) {
+            Debug::outputVar(json_decode(json_encode($mVar), true), $sPreNL);
         } else {
             Debug::outputSimpleVar($mVar);
         }