diff --git a/SolrSearchPlugin.php b/SolrSearchPlugin.php index d1c50f0a..a9c6e0da 100644 --- a/SolrSearchPlugin.php +++ b/SolrSearchPlugin.php @@ -151,7 +151,6 @@ public function hookAfterSaveRecord($args) if (!is_null($doc)) { $solr->addDocuments(array($doc)); $solr->commit(); - $solr->optimize(); } // If not, remove an existing document. @@ -159,7 +158,6 @@ public function hookAfterSaveRecord($args) try { $solr->deleteById($mgr->getId($record)); $solr->commit(); - $solr->optimize(); } catch (Exception $e) {} } @@ -197,7 +195,6 @@ public function hookAfterSaveItem($args) $doc = SolrSearch_Helpers_Index::itemToDocument($item); $solr->addDocuments(array($doc)); $solr->commit(); - $solr->optimize(); } @@ -233,7 +230,6 @@ public function hookBeforeDeleteRecord($args) try { $solr->deleteById($id); $solr->commit(); - $solr->optimize(); } catch (Exception $e) {} } @@ -254,7 +250,6 @@ public function hookBeforeDeleteItem($args) try { $solr->deleteById('Item_' . $item['id']); $solr->commit(); - $solr->optimize(); } catch (Exception $e) {} }