// Read Config file $configArray = parse_ini_file('../web/conf/config.ini', true); // Setup Solr Connection $url = $configArray['Index']['url']; $solr = new Solr($url); if ($configArray['System']['debugSolr']) { $solr->debug = true; } // Make ILS Connection try { $catalog = new CatalogConnection($configArray['Catalog']['driver']); } catch (PDOException $e) { // What should we do with this error? if ($configArray['System']['debugSolr']) { echo '<pre>'; echo 'DEBUG: ' . $e->getMessage(); echo '</pre>'; } } // Get Suppressed Records and Delete from index if ($catalog->status) { $result = $catalog->getSuppressedRecords(); if (!PEAR::isError($result)) { $status = $solr->deleteRecords($result); if ($status) { // Commit and Optimize $solr->commit(); $solr->optimize(); } } }