unspsc update
unspsc update

--- a/admin/updateUNSPSC.php
+++ b/admin/updateUNSPSC.php
@@ -12,6 +12,8 @@
     // some Australian spellings
     $isiz = str_replace("iz", "is", $row['Title']);
     $unspsc[$isiz] = $row['UNSPSC'];
+    $iseize = str_replace("ize", "ise", $row['Title']);
+    $unspsc[$iseize] = $row['UNSPSC'];
     $filfill = str_replace("fill", "fil", $row['Title']);
     $unspsc[$filfill] = $row['UNSPSC'];
     $ampersand = str_replace("&", "and", $row['Title']);
@@ -20,6 +22,8 @@
     $unspsc[$defence] = $row['UNSPSC'];
     $armor = str_replace("rmored", "rmoured", $row['Title']);
     $unspsc[$armor] = $row['UNSPSC'];
+    $labour = str_replace("labor", "labour", $row['Title']);
+    $unspsc[$labour] = $row['UNSPSC'];
     $erre = str_replace("er", "re", $row['Title']);
     $unspsc[$erre] = $row['UNSPSC'];
     $center = str_replace("center", "centre", $row['Title']);
@@ -38,6 +42,14 @@
         $airo = str_replace("airplane", "aeroplane", $row['Title']);
     $unspsc[$airo] = $row['UNSPSC'];
     // some divergence from standard
+        $services = str_replace( " services", "", $row['Title']);
+    $unspsc[$services] = $row['UNSPSC'];
+        $microa = str_replace( "micro assemblies", "microassemblies", $row['Title']);
+    $unspsc[$microa] = $row['UNSPSC'];
+        $lightb = str_replace( "light bulbs", "lightbulbs", $row['Title']);
+    $unspsc[$lightb] = $row['UNSPSC'];
+        $kitchen = str_replace( "domestic kitchenware and kitchen supplies", "domestic kitchenware", $row['Title']);
+    $unspsc[$kitchen] = $row['UNSPSC'];
       $forensicit = str_replace("Information technology consultation services", "Forensic IT Services", $row['Title']);
         $unspsc[$forensicit] = $row['UNSPSC'];
         $powercable = str_replace( "Power cable", "Power cable installation and supply", $row['Title']);

file:a/search.php -> file:b/search.php
--- a/search.php
+++ b/search.php
@@ -67,11 +67,15 @@
     "contractStart", "supplierName"
     FROM contractnotice
     WHERE ' .$yearQ . ' to_tsvector(\'english\', description) @@ plainto_tsquery(\'english\', :keyword) and "childCN" is null
-    ORDER BY "value" DESC limit 100';
+    ORDER BY "value" DESC limit 1000';
     $query = $conn->prepare($query);
     $query->bindParam(":keyword", $keyword);
     $query->execute();
     databaseError($conn->errorInfo());
+if ($query->rowCount() > 999) {
+// if 1000 records warn too many results
+print "<b> More than 1000 results found so only first 1000 shown. Please filter by year or keyword to see all results </b>";
+}
 echo '<table>';
     foreach ($query->fetchAll() as $row) {
 //print_r($row);