Merge branch 'MDL-53281-master' of git://github.com/merrill-oakland/moodle
authorAndrew Nicols <andrew@nicols.co.uk>
Wed, 9 Mar 2016 01:25:07 +0000 (09:25 +0800)
committerAndrew Nicols <andrew@nicols.co.uk>
Wed, 9 Mar 2016 01:25:07 +0000 (09:25 +0800)
search/engine/solr/classes/engine.php

index 1e45829..b8b88ce 100644 (file)
@@ -327,7 +327,7 @@ class engine extends \core_search\engine {
      * @return void
      */
     public function optimize() {
-        $this->get_search_client()->optimize();
+        $this->get_search_client()->optimize(1, true, false);
     }
 
     /**
@@ -424,6 +424,7 @@ class engine extends \core_search\engine {
             'ssl_password' => !empty($this->config->ssl_keypassword) ? $this->config->ssl_keypassword : '',
             'ssl_cainfo' => !empty($this->config->ssl_cainfo) ? $this->config->ssl_cainfo : '',
             'ssl_capath' => !empty($this->config->ssl_capath) ? $this->config->ssl_capath : '',
+            'timeout' => !empty($this->config->server_timeout) ? $this->config->server_timeout : '30'
         );
 
         $this->client = new \SolrClient($options);