MDL-68726 Search: Stop Solr 'optimize' behaviour

The optimize feature in Solr is usually considered harmful, especially
prior to Solr 7.5.

This change simply removes the optimize implementation from the Solr
engine.
This commit is contained in:
sam marshall 2020-05-14 16:15:46 +01:00
parent 741d6dde19
commit 9b3646417e
2 changed files with 2 additions and 9 deletions

View File

@ -394,6 +394,8 @@ abstract class engine {
*/
public function optimize() {
// Nothing by default.
mtrace('The ' . get_string('pluginname', $this->get_plugin_name()) .
' search engine does not require automatic optimization.');
}
/**

View File

@ -1203,15 +1203,6 @@ class engine extends \core_search\engine {
return (bool)$this->config->fileindexing;
}
/**
* Defragments the index.
*
* @return void
*/
public function optimize() {
$this->get_search_client()->optimize(1, true, false);
}
/**
* Deletes the specified document.
*