/**
  * Update Settings
  * @return void
  */
 protected function updateSettingsObject()
 {
     global $ilAccess, $ilErr;
     $this->initFormSettings();
     $this->form->checkInput();
     if (!$ilAccess->checkAccess('write', '', $this->object->getRefId())) {
         $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
     }
     include_once './Services/Search/classes/class.ilSearchSettings.php';
     $settings = new ilSearchSettings();
     $settings->setMaxHits((int) $_POST['max_hits']);
     switch ((int) $_POST['search_type']) {
         case ilSearchSettings::LIKE_SEARCH:
             $settings->enableIndex(false);
             $settings->enableLucene(false);
             break;
         case ilSearchSettings::INDEX_SEARCH:
             $settings->enableIndex(true);
             $settings->enableLucene(false);
             break;
         case ilSearchSettings::LUCENE_SEARCH:
             $settings->enableIndex(false);
             $settings->enableLucene(true);
             break;
     }
     $settings->setDefaultOperator((int) $_POST['operator']);
     $settings->enableLuceneItemFilter((int) $_POST['if']);
     $settings->setLuceneItemFilter((array) $_POST['filter']);
     $settings->setHideAdvancedSearch($_POST['hide_adv_search']);
     $settings->setAutoCompleteLength($_POST['auto_complete_length']);
     $settings->update();
     unset($_SESSION['search_last_class']);
     ilUtil::sendSuccess($this->lng->txt('settings_saved'));
     $this->settingsObject();
 }