ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSearchSettings Class Reference
+ Collaboration diagram for ilSearchSettings:

Public Member Functions

 ilSearchSettings ()
 
 getEnabledLuceneItemFilterDefinitions ()
 Get lucene item filter definitions. More...
 
 getEnabledLuceneMimeFilterDefinitions ()
 
 enablePrefixWildcardQuery ($a_stat)
 
 isPrefixWildcardQueryEnabled ()
 
 _getSearchSettingRefId ()
 Read the ref_id of Search Settings object. More...
 
 enabledIndex ()
 
 enableIndex ($a_status)
 
 enabledLucene ()
 
 enableLucene ($a_status)
 
 getMaxHits ()
 
 setMaxHits ($a_max_hits)
 
 getDefaultOperator ()
 
 setDefaultOperator ($a_op)
 
 setFragmentSize ($a_size)
 
 getFragmentSize ()
 
 setFragmentCount ($a_count)
 
 getHideAdvancedSearch ()
 
 setHideAdvancedSearch ($a_status)
 
 getAutoCompleteLength ()
 
 setAutoCompleteLength ($auto_complete_length)
 
 getFragmentCount ()
 
 setMaxSubitems ($a_max)
 
 getMaxSubitems ()
 
 isRelevanceVisible ()
 
 showRelevance ($a_status)
 
 getLastIndexTime ()
 
 enableLuceneItemFilter ($a_status)
 
 isLuceneItemFilterEnabled ()
 
 getLuceneItemFilter ()
 
 setLuceneItemFilter ($a_filter)
 
 enableLuceneOfflineFilter ($a_stat)
 
 isLuceneOfflineFilterEnabled ()
 
 showSubRelevance ($a_stat)
 
 isSubRelevanceVisible ()
 
 setLuceneMimeFilter ($a_filter)
 
 getLuceneMimeFilter ()
 
 isLuceneMimeFilterEnabled ()
 Check if lucene mime filter is enabled. More...
 
 enableLuceneMimeFilter ($a_stat)
 Enable lucene mime filter. More...
 
 setLastIndexTime ($time)
 
 isLuceneUserSearchEnabled ()
 Check if user search is enabled. More...
 
 enableLuceneUserSearch ($a_status)
 Enable lucene user search. More...
 
 update ()
 
 __read ()
 

Static Public Member Functions

static getInstance ()
 
static getLuceneItemFilterDefinitions ()
 Get lucene item filter definitions. More...
 
static getLuceneMimeFilterDefinitions ()
 

Data Fields

const LIKE_SEARCH = 0
 
const INDEX_SEARCH = 1
 
const LUCENE_SEARCH = 2
 
const OPERATOR_AND = 1
 
const OPERATOR_OR = 2
 
 $ilias = null
 
 $max_hits = null
 
 $index = null
 

Protected Attributes

 $default_operator = self::OPERATOR_AND
 
 $fragmentSize = 30
 
 $fragmentCount = 3
 
 $numSubitems = 5
 
 $showRelevance = true
 
 $last_index_date = null
 
 $lucene_item_filter_enabled = false
 
 $lucene_item_filter = array()
 
 $lucene_offline_filter = true
 
 $auto_complete_length = 10
 
 $lucene_mime_filter_enabled = false
 
 $lucene_mime_filter = array()
 
 $showSubRelevance = false
 
 $prefix_wildcard = false
 
 $user_search = false
 

Static Protected Attributes

static $instance = null
 

Detailed Description

Definition at line 14 of file class.ilSearchSettings.php.

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )

Definition at line 417 of file class.ilSearchSettings.php.

References $ilSetting, enableIndex(), enableLucene(), enableLuceneItemFilter(), enableLuceneMimeFilter(), enableLuceneOfflineFilter(), enableLuceneUserSearch(), enablePrefixWildcardQuery(), getLuceneItemFilter(), getLuceneMimeFilter(), IL_CAL_UNIX, isLuceneOfflineFilterEnabled(), setAutoCompleteLength(), setDefaultOperator(), setFragmentCount(), setFragmentSize(), setHideAdvancedSearch(), setLastIndexTime(), setLuceneItemFilter(), setLuceneMimeFilter(), setMaxHits(), setMaxSubitems(), showRelevance(), and showSubRelevance().

Referenced by ilSearchSettings().

418  {
419  global $ilSetting;
420 
421  $this->setMaxHits($this->ilias->getSetting('search_max_hits',10));
422  $this->enableIndex($this->ilias->getSetting('search_index',0));
423  $this->enableLucene($this->ilias->getSetting('search_lucene',0));
424 
425  $this->setDefaultOperator($this->ilias->getSetting('lucene_default_operator',self::OPERATOR_AND));
426  $this->setFragmentSize($this->ilias->getSetting('lucene_fragment_size',50));
427  $this->setFragmentCount($this->ilias->getSetting('lucene_fragment_count',3));
428  $this->setMaxSubitems($this->ilias->getSetting('lucene_max_subitems',5));
429  $this->showRelevance($this->ilias->getSetting('lucene_show_relevance',true));
430 
431  if($time = $this->ilias->getSetting('lucene_last_index_time',false))
432  {
433  $this->setLastIndexTime(new ilDateTime($time,IL_CAL_UNIX));
434  }
435  else
436  {
437  $this->setLastIndexTime(null);
438  }
439 
440  $this->setHideAdvancedSearch($this->ilias->getSetting('hide_adv_search',0));
441  $this->setAutoCompleteLength($this->ilias->getSetting('auto_complete_length',$this->getAutoCompleteLength()));
442 
443  $this->enableLuceneItemFilter($this->ilias->getSetting('lucene_item_filter_enabled',(int) $this->isLuceneItemFilterEnabled()));
444 
445  $filter = $this->ilias->getSetting('lucene_item_filter',serialize($this->getLuceneItemFilter()));
446  $this->setLuceneItemFilter(unserialize($filter));
447  $this->enableLuceneOfflineFilter($this->ilias->getSetting('lucene_offline_filter'), $this->isLuceneOfflineFilterEnabled());
448 
449  $this->enableLuceneMimeFilter($ilSetting->get('lucene_mime_filter_enabled',$this->lucene_item_filter_enabled));
450  $filter = $this->ilias->getSetting('lucene_mime_filter',serialize($this->getLuceneMimeFilter()));
451  $this->setLuceneMimeFilter(unserialize($filter));
452  $this->showSubRelevance($this->ilias->getSetting('lucene_sub_relevance',$this->showSubRelevance));
453  $this->enablePrefixWildcardQuery($this->ilias->getSetting('lucene_prefix_wildcard',$this->prefix_wildcard));
454  $this->enableLuceneUserSearch($ilSetting->get('lucene_user_search',$this->user_search));
455 
456  }
setAutoCompleteLength($auto_complete_length)
const IL_CAL_UNIX
Date and time handling
redirection script todo: (a better solution should control the processing via a xml file) ...
enableLuceneMimeFilter($a_stat)
Enable lucene mime filter.
global $ilSetting
Definition: privfeed.php:40
enableLuceneUserSearch($a_status)
Enable lucene user search.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getSearchSettingRefId()

ilSearchSettings::_getSearchSettingRefId ( )

Read the ref_id of Search Settings object.

normally used for rbacsystem->checkAccess()

Returns
int ref_id public

Definition at line 164 of file class.ilSearchSettings.php.

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilSearchController\executeCommand(), and ilMainMenuGUI\getLanguageSelection().

165  {
166  global $ilDB;
167 
168  static $seas_ref_id = 0;
169 
170  if($seas_ref_id)
171  {
172  return $seas_ref_id;
173  }
174  $query = "SELECT object_reference.ref_id as ref_id FROM object_reference,tree,object_data ".
175  "WHERE tree.parent = ".$ilDB->quote(SYSTEM_FOLDER_ID,'integer')." ".
176  "AND object_data.type = 'seas' ".
177  "AND object_reference.ref_id = tree.child ".
178  "AND object_reference.obj_id = object_data.obj_id";
179 
180  $res = $ilDB->query($query);
181  $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
182 
183  return $seas_ref_id = $row->ref_id;
184  }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB
+ Here is the caller graph for this function:

◆ enabledIndex()

ilSearchSettings::enabledIndex ( )

Definition at line 186 of file class.ilSearchSettings.php.

References $ilDB.

Referenced by update().

187  {
188  global $ilDB;
189 
190  if($ilDB->getDBType() == 'oracle')
191  {
192  return false;
193  }
194  return $this->index ? true : false;
195  }
global $ilDB
+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

Definition at line 200 of file class.ilSearchSettings.php.

Referenced by ilSubItemListGUI\parseRelevance(), and update().

201  {
202  return $this->lucene ? true : false;
203  }
+ Here is the caller graph for this function:

◆ enableIndex()

ilSearchSettings::enableIndex (   $a_status)

Definition at line 196 of file class.ilSearchSettings.php.

Referenced by __read().

197  {
198  $this->index = $a_status;
199  }
+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene (   $a_status)

Definition at line 204 of file class.ilSearchSettings.php.

Referenced by __read().

205  {
206  $this->lucene = $a_status ? true : false;
207  }
+ Here is the caller graph for this function:

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter (   $a_status)

Definition at line 292 of file class.ilSearchSettings.php.

Referenced by __read().

293  {
294  $this->lucene_item_filter_enabled = $a_status;
295  }
+ Here is the caller graph for this function:

◆ enableLuceneMimeFilter()

ilSearchSettings::enableLuceneMimeFilter (   $a_stat)

Enable lucene mime filter.

Parameters
type$a_stat

Definition at line 356 of file class.ilSearchSettings.php.

Referenced by __read().

357  {
358  $this->lucene_mime_filter_enabled = $a_stat;
359  }
+ Here is the caller graph for this function:

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter (   $a_stat)

Definition at line 313 of file class.ilSearchSettings.php.

Referenced by __read().

314  {
315  $this->lucene_offline_filter = $a_stat;
316  }
+ Here is the caller graph for this function:

◆ enableLuceneUserSearch()

ilSearchSettings::enableLuceneUserSearch (   $a_status)

Enable lucene user search.

Parameters
type$a_status

Definition at line 383 of file class.ilSearchSettings.php.

Referenced by __read().

384  {
385  $this->user_search = $a_status;
386  }
+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery (   $a_stat)

Definition at line 147 of file class.ilSearchSettings.php.

Referenced by __read().

148  {
149  $this->prefix_wildcard = $a_stat;
150  }
+ Here is the caller graph for this function:

◆ getAutoCompleteLength()

ilSearchSettings::getAutoCompleteLength ( )

Definition at line 251 of file class.ilSearchSettings.php.

References $auto_complete_length.

Referenced by update().

252  {
254  }
+ Here is the caller graph for this function:

◆ getDefaultOperator()

ilSearchSettings::getDefaultOperator ( )

Definition at line 218 of file class.ilSearchSettings.php.

References $default_operator.

Referenced by update().

219  {
221  }
+ Here is the caller graph for this function:

◆ getEnabledLuceneItemFilterDefinitions()

ilSearchSettings::getEnabledLuceneItemFilterDefinitions ( )

Get lucene item filter definitions.

Returns
Todo:
This has to be defined in module.xml

Definition at line 108 of file class.ilSearchSettings.php.

References getLuceneItemFilter(), and isLuceneItemFilterEnabled().

109  {
110  if(!$this->isLuceneItemFilterEnabled())
111  {
112  return array();
113  }
114 
115  $filter = $this->getLuceneItemFilter();
116  $enabled = array();
117  foreach(self::getLuceneItemFilterDefinitions() as $obj => $def)
118  {
119  if(isset($filter[$obj]) and $filter[$obj])
120  {
121  $enabled[$obj] = $def;
122  }
123  }
124  return $enabled;
125  }
+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

Definition at line 128 of file class.ilSearchSettings.php.

References getLuceneMimeFilter(), and isLuceneItemFilterEnabled().

129  {
130  if(!$this->isLuceneItemFilterEnabled())
131  {
132  return array();
133  }
134 
135  $filter = $this->getLuceneMimeFilter();
136  $enabled = array();
137  foreach(self::getLuceneMimeFilterDefinitions() as $mime => $def)
138  {
139  if(isset($filter[$mime]) and $filter[$mime])
140  {
141  $enabled[$mime] = $def;
142  }
143  }
144  return $enabled;
145  }
+ Here is the call graph for this function:

◆ getFragmentCount()

ilSearchSettings::getFragmentCount ( )

Definition at line 260 of file class.ilSearchSettings.php.

References $fragmentCount.

Referenced by update().

261  {
262  return $this->fragmentCount;
263  }
+ Here is the caller graph for this function:

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

Definition at line 233 of file class.ilSearchSettings.php.

References $fragmentSize.

Referenced by update().

234  {
235  return $this->fragmentSize;
236  }
+ Here is the caller graph for this function:

◆ getHideAdvancedSearch()

ilSearchSettings::getHideAdvancedSearch ( )

Definition at line 243 of file class.ilSearchSettings.php.

Referenced by update().

244  {
245  return $this->hide_adv_search ? true : false;
246  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilSearchSettings::getInstance ( )
static
Returns
ilSearchSettings

Definition at line 61 of file class.ilSearchSettings.php.

References ilSearchSettings().

Referenced by ilSearchGUI\__construct(), ilLuceneSearchResultFilter\__construct(), ilSubItemListGUI\__construct(), ilObjectSearchFactory\_getAdvancedSearchInstance(), ilObjectSearchFactory\_getExerciseSearchInstance(), ilObjectSearchFactory\_getForumSearchInstance(), ilObjectSearchFactory\_getGlossaryDefinitionSearchInstance(), ilObjectSearchFactory\_getLMContentSearchInstance(), ilObjectSearchFactory\_getMediacastSearchInstance(), ilObjectSearchFactory\_getMediaPoolSearchInstance(), ilObjectSearchFactory\_getMetaDataSearchInstance(), ilObjectSearchFactory\_getTestSearchInstance(), ilObjectSearchFactory\_getWebresourceSearchInstance(), ilObjectSearchFactory\_getWikiContentSearchInstance(), ilSearchResultPresentation\appendRelevance(), ilSearchResultTableGUI\enabledRelevance(), ilLuceneAdvancedSearchFields\getFields(), ilMainMenuSearchGUI\getHTML(), ilSearchController\getLastClass(), ilSearchAutoComplete\getList(), ilSearchAutoComplete\getLuceneList(), ilSearchBaseGUI\getSearchAreaForm(), ilLuceneUserSearchGUI\getTabs(), ilLuceneAdvancedSearchGUI\getTabs(), ilLuceneSearchGUI\getTabs(), ilQueryParser\ilQueryParser(), ilObjSearchSettingsGUI\initFormLuceneSettings(), ilSearchBaseGUI\initStandardSearchForm(), ilLuceneSearchGUI\initUserSearchCache(), ilMailFolderTableGUI\isLuceneSearchEnabled(), ilBlogPostingGUI\keywordAutocomplete(), ilSubItemListGUI\parseRelevance(), ilAdvancedSearchGUI\performSearch(), ilLuceneSearchGUI\performSearch(), ilObjSearchSettingsGUI\saveLuceneSettingsObject(), ilSoapObjectAdministration\searchObjects(), ilUserAutoComplete\setResultField(), ilSearchGUI\showSearch(), ilLuceneSearchGUI\showSearchForm(), and ilLuceneIndexer\updateLuceneIndex().

62  {
63  if(self::$instance == null)
64  {
65  return self::$instance = new ilSearchSettings();
66  }
67  return self::$instance;
68  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

Definition at line 285 of file class.ilSearchSettings.php.

References IL_CAL_DATETIME.

Referenced by update().

286  {
287  return $this->last_index_date instanceof ilDateTime ?
288  $this->last_index_date :
289  new ilDateTime('2009-01-01 12:00:00',IL_CAL_DATETIME);
290  }
const IL_CAL_DATETIME
Date and time handling
+ Here is the caller graph for this function:

◆ getLuceneItemFilter()

ilSearchSettings::getLuceneItemFilter ( )

Definition at line 302 of file class.ilSearchSettings.php.

References $lucene_item_filter.

Referenced by __read(), getEnabledLuceneItemFilterDefinitions(), and update().

303  {
305  }
+ Here is the caller graph for this function:

◆ getLuceneItemFilterDefinitions()

static ilSearchSettings::getLuceneItemFilterDefinitions ( )
static

Get lucene item filter definitions.

Returns
Todo:
This has to be defined in module.xml

Definition at line 75 of file class.ilSearchSettings.php.

Referenced by ilObjSearchSettingsGUI\initFormSettings().

76  {
77  return array(
78  'crs' => array('filter' => 'type:crs','trans' => 'objs_crs'),
79  'grp' => array('filter' => 'type:grp', 'trans' => 'objs_grp'),
80  'lms' => array('filter' => 'type:lm OR type:htlm OR type:sahs OR type:dbk','trans' => 'learning_resource'),
81  'glo' => array('filter' => 'type:glo','trans' => 'objs_glo'),
82  'mep' => array('filter' => 'type:mep', 'trans' => 'objs_mep'),
83  'tst' => array('filter' => 'type:tst OR type:svy OR type:qpl OR type:spl','trans' => 'search_tst_svy'),
84  'frm' => array('filter' => 'type:frm','trans' => 'objs_frm'),
85  'exc' => array('filter' => 'type:exc','trans' => 'objs_exc'),
86  'file' => array('filter' => 'type:file','trans' => 'objs_file'),
87  'mcst' => array('filter' => 'type:mcst','trans' => 'objs_mcst'),
88  'wiki' => array('filter' => 'type:wiki','trans' => 'objs_wiki')
89  );
90  }
+ Here is the caller graph for this function:

◆ getLuceneMimeFilter()

ilSearchSettings::getLuceneMimeFilter ( )

Definition at line 339 of file class.ilSearchSettings.php.

References $lucene_mime_filter.

Referenced by __read(), getEnabledLuceneMimeFilterDefinitions(), and update().

340  {
342  }
+ Here is the caller graph for this function:

◆ getLuceneMimeFilterDefinitions()

static ilSearchSettings::getLuceneMimeFilterDefinitions ( )
static

Definition at line 92 of file class.ilSearchSettings.php.

Referenced by ilObjSearchSettingsGUI\initFormLuceneSettings().

93  {
94  return array(
95  'pdf' => array('filter' => 'mimeType:pdf','trans' => 'search_mime_pdf'),
96  'word' => array('filter' => 'mimeType:word','trans' => 'search_mime_word'),
97  'excel' => array('filter' => 'mimeType:excel','trans' => 'search_mime_excel'),
98  'powerpoint' => array('filter' => 'mimeType:powerpoint','trans' => 'search_mime_powerpoint'),
99  'image' => array('filter' => 'mimeType:image','trans' => 'search_mime_image')
100  );
101  }
+ Here is the caller graph for this function:

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

Definition at line 209 of file class.ilSearchSettings.php.

References $max_hits.

Referenced by update().

210  {
211  return $this->max_hits;
212  }
+ Here is the caller graph for this function:

◆ getMaxSubitems()

ilSearchSettings::getMaxSubitems ( )

Definition at line 270 of file class.ilSearchSettings.php.

References $numSubitems.

Referenced by update().

271  {
272  return $this->numSubitems;
273  }
+ Here is the caller graph for this function:

◆ ilSearchSettings()

ilSearchSettings::ilSearchSettings ( )

Definition at line 47 of file class.ilSearchSettings.php.

References $ilias, and __read().

Referenced by getInstance().

48  {
49  global $ilias;
50 
51  $this->ilias =& $ilias;
52  $this->__read();
53  }
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isLuceneItemFilterEnabled()

ilSearchSettings::isLuceneItemFilterEnabled ( )

Definition at line 297 of file class.ilSearchSettings.php.

References $lucene_item_filter_enabled.

Referenced by getEnabledLuceneItemFilterDefinitions(), getEnabledLuceneMimeFilterDefinitions(), and update().

298  {
300  }
+ Here is the caller graph for this function:

◆ isLuceneMimeFilterEnabled()

ilSearchSettings::isLuceneMimeFilterEnabled ( )

Check if lucene mime filter is enabled.

Definition at line 347 of file class.ilSearchSettings.php.

References $lucene_mime_filter_enabled.

Referenced by update().

348  {
350  }
+ Here is the caller graph for this function:

◆ isLuceneOfflineFilterEnabled()

ilSearchSettings::isLuceneOfflineFilterEnabled ( )

Definition at line 318 of file class.ilSearchSettings.php.

References $lucene_offline_filter.

Referenced by __read(), and update().

319  {
321  }
+ Here is the caller graph for this function:

◆ isLuceneUserSearchEnabled()

ilSearchSettings::isLuceneUserSearchEnabled ( )

Check if user search is enabled.

Returns
type

Definition at line 374 of file class.ilSearchSettings.php.

References $user_search.

Referenced by update().

375  {
376  return $this->user_search;
377  }
+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

Definition at line 152 of file class.ilSearchSettings.php.

References $prefix_wildcard.

Referenced by update().

153  {
154  return $this->prefix_wildcard;
155  }
+ Here is the caller graph for this function:

◆ isRelevanceVisible()

ilSearchSettings::isRelevanceVisible ( )

Definition at line 275 of file class.ilSearchSettings.php.

References $showRelevance.

Referenced by update().

276  {
277  return $this->showRelevance;
278  }
+ Here is the caller graph for this function:

◆ isSubRelevanceVisible()

ilSearchSettings::isSubRelevanceVisible ( )

Definition at line 328 of file class.ilSearchSettings.php.

References $showSubRelevance.

Referenced by update().

329  {
331  }
+ Here is the caller graph for this function:

◆ setAutoCompleteLength()

ilSearchSettings::setAutoCompleteLength (   $auto_complete_length)

Definition at line 255 of file class.ilSearchSettings.php.

References $auto_complete_length.

Referenced by __read().

256  {
257  $this->auto_complete_length = $auto_complete_length;
258  }
+ Here is the caller graph for this function:

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator (   $a_op)

Definition at line 223 of file class.ilSearchSettings.php.

Referenced by __read().

224  {
225  $this->default_operator = $a_op;
226  }
+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount (   $a_count)

Definition at line 238 of file class.ilSearchSettings.php.

Referenced by __read().

239  {
240  $this->fragmentCount = $a_count;
241  }
+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize (   $a_size)

Definition at line 228 of file class.ilSearchSettings.php.

Referenced by __read().

229  {
230  $this->fragmentSize = $a_size;
231  }
+ Here is the caller graph for this function:

◆ setHideAdvancedSearch()

ilSearchSettings::setHideAdvancedSearch (   $a_status)

Definition at line 247 of file class.ilSearchSettings.php.

Referenced by __read().

248  {
249  $this->hide_adv_search = $a_status;
250  }
+ Here is the caller graph for this function:

◆ setLastIndexTime()

ilSearchSettings::setLastIndexTime (   $time)
Parameters
objectinstance of ilDateTime

Definition at line 365 of file class.ilSearchSettings.php.

Referenced by __read().

366  {
367  $this->last_index_date = $time;
368  }
+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter (   $a_filter)

Definition at line 308 of file class.ilSearchSettings.php.

Referenced by __read().

309  {
310  $this->lucene_item_filter = $a_filter;
311  }
+ Here is the caller graph for this function:

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter (   $a_filter)

Definition at line 334 of file class.ilSearchSettings.php.

Referenced by __read().

335  {
336  $this->lucene_mime_filter = $a_filter;
337  }
+ Here is the caller graph for this function:

◆ setMaxHits()

ilSearchSettings::setMaxHits (   $a_max_hits)

Definition at line 213 of file class.ilSearchSettings.php.

Referenced by __read().

214  {
215  $this->max_hits = $a_max_hits;
216  }
+ Here is the caller graph for this function:

◆ setMaxSubitems()

ilSearchSettings::setMaxSubitems (   $a_max)

Definition at line 265 of file class.ilSearchSettings.php.

Referenced by __read().

266  {
267  $this->numSubitems = $a_max;
268  }
+ Here is the caller graph for this function:

◆ showRelevance()

ilSearchSettings::showRelevance (   $a_status)

Definition at line 280 of file class.ilSearchSettings.php.

Referenced by __read().

281  {
282  $this->showRelevance = (bool) $a_status;
283  }
+ Here is the caller graph for this function:

◆ showSubRelevance()

ilSearchSettings::showSubRelevance (   $a_stat)

Definition at line 323 of file class.ilSearchSettings.php.

Referenced by __read().

324  {
325  $this->showSubRelevance = $a_stat;
326  }
+ Here is the caller graph for this function:

◆ update()

ilSearchSettings::update ( )

Definition at line 388 of file class.ilSearchSettings.php.

References $ilSetting, enabledIndex(), enabledLucene(), getAutoCompleteLength(), getDefaultOperator(), getFragmentCount(), getFragmentSize(), getHideAdvancedSearch(), getLastIndexTime(), getLuceneItemFilter(), getLuceneMimeFilter(), getMaxHits(), getMaxSubitems(), IL_CAL_UNIX, isLuceneItemFilterEnabled(), isLuceneMimeFilterEnabled(), isLuceneOfflineFilterEnabled(), isLuceneUserSearchEnabled(), isPrefixWildcardQueryEnabled(), isRelevanceVisible(), and isSubRelevanceVisible().

389  {
390  global $ilSetting;
391 
392  $this->ilias->setSetting('search_max_hits',$this->getMaxHits());
393  $this->ilias->setSetting('search_index',(int) $this->enabledIndex());
394  $this->ilias->setSetting('search_lucene',(int) $this->enabledLucene());
395 
396  $this->ilias->setSetting('lucene_default_operator',$this->getDefaultOperator());
397  $this->ilias->setSetting('lucene_fragment_size',$this->getFragmentSize());
398  $this->ilias->setSetting('lucene_fragment_count',$this->getFragmentCount());
399  $this->ilias->setSetting('lucene_max_subitems',$this->getMaxSubitems());
400  $this->ilias->setSetting('lucene_show_relevance',$this->isRelevanceVisible());
401  $this->ilias->setSetting('lucene_last_index_time',$this->getLastIndexTime()->get(IL_CAL_UNIX));
402  $this->ilias->setSetting('hide_adv_search',(int) $this->getHideAdvancedSearch());
403  $this->ilias->setSetting('auto_complete_length',(int) $this->getAutoCompleteLength());
404  $this->ilias->setSetting('lucene_item_filter_enabled',(int) $this->isLuceneItemFilterEnabled());
405  $this->ilias->setSetting('lucene_item_filter',serialize($this->getLuceneItemFilter()));
406  $this->ilias->setSetting('lucene_offline_filter',(int) $this->isLuceneOfflineFilterEnabled());
407  $this->ilias->setSetting('lucene_mime_filter',serialize($this->getLuceneMimeFilter()));
408  $this->ilias->setSetting('lucene_sub_relevance',$this->isSubRelevanceVisible());
409  $ilSetting->set('lucene_mime_filter_enabled',$this->isLuceneMimeFilterEnabled());
410  $this->ilias->setSetting('lucene_prefix_wildcard',$this->isPrefixWildcardQueryEnabled());
411  $ilSetting->set('lucene_user_search',$this->isLuceneUserSearchEnabled());
412 
413  return true;
414  }
isLuceneMimeFilterEnabled()
Check if lucene mime filter is enabled.
const IL_CAL_UNIX
redirection script todo: (a better solution should control the processing via a xml file) ...
isLuceneUserSearchEnabled()
Check if user search is enabled.
global $ilSetting
Definition: privfeed.php:40
+ Here is the call graph for this function:

Field Documentation

◆ $auto_complete_length

ilSearchSettings::$auto_complete_length = 10
protected

Definition at line 34 of file class.ilSearchSettings.php.

Referenced by getAutoCompleteLength(), and setAutoCompleteLength().

◆ $default_operator

ilSearchSettings::$default_operator = self::OPERATOR_AND
protected

Definition at line 25 of file class.ilSearchSettings.php.

Referenced by getDefaultOperator().

◆ $fragmentCount

ilSearchSettings::$fragmentCount = 3
protected

Definition at line 27 of file class.ilSearchSettings.php.

Referenced by getFragmentCount().

◆ $fragmentSize

ilSearchSettings::$fragmentSize = 30
protected

Definition at line 26 of file class.ilSearchSettings.php.

Referenced by getFragmentSize().

◆ $ilias

ilSearchSettings::$ilias = null

Definition at line 43 of file class.ilSearchSettings.php.

Referenced by ilSearchSettings().

◆ $index

ilSearchSettings::$index = null

Definition at line 45 of file class.ilSearchSettings.php.

◆ $instance

ilSearchSettings::$instance = null
staticprotected

Definition at line 23 of file class.ilSearchSettings.php.

◆ $last_index_date

ilSearchSettings::$last_index_date = null
protected

Definition at line 30 of file class.ilSearchSettings.php.

◆ $lucene_item_filter

ilSearchSettings::$lucene_item_filter = array()
protected

Definition at line 32 of file class.ilSearchSettings.php.

Referenced by getLuceneItemFilter().

◆ $lucene_item_filter_enabled

ilSearchSettings::$lucene_item_filter_enabled = false
protected

Definition at line 31 of file class.ilSearchSettings.php.

Referenced by isLuceneItemFilterEnabled().

◆ $lucene_mime_filter

ilSearchSettings::$lucene_mime_filter = array()
protected

Definition at line 37 of file class.ilSearchSettings.php.

Referenced by getLuceneMimeFilter().

◆ $lucene_mime_filter_enabled

ilSearchSettings::$lucene_mime_filter_enabled = false
protected

Definition at line 36 of file class.ilSearchSettings.php.

Referenced by isLuceneMimeFilterEnabled().

◆ $lucene_offline_filter

ilSearchSettings::$lucene_offline_filter = true
protected

Definition at line 33 of file class.ilSearchSettings.php.

Referenced by isLuceneOfflineFilterEnabled().

◆ $max_hits

ilSearchSettings::$max_hits = null

Definition at line 44 of file class.ilSearchSettings.php.

Referenced by getMaxHits().

◆ $numSubitems

ilSearchSettings::$numSubitems = 5
protected

Definition at line 28 of file class.ilSearchSettings.php.

Referenced by getMaxSubitems().

◆ $prefix_wildcard

ilSearchSettings::$prefix_wildcard = false
protected

Definition at line 39 of file class.ilSearchSettings.php.

Referenced by isPrefixWildcardQueryEnabled().

◆ $showRelevance

ilSearchSettings::$showRelevance = true
protected

Definition at line 29 of file class.ilSearchSettings.php.

Referenced by isRelevanceVisible().

◆ $showSubRelevance

ilSearchSettings::$showSubRelevance = false
protected

Definition at line 38 of file class.ilSearchSettings.php.

Referenced by isSubRelevanceVisible().

◆ $user_search

ilSearchSettings::$user_search = false
protected

Definition at line 41 of file class.ilSearchSettings.php.

Referenced by isLuceneUserSearchEnabled().

◆ INDEX_SEARCH

const ilSearchSettings::INDEX_SEARCH = 1

◆ LIKE_SEARCH

const ilSearchSettings::LIKE_SEARCH = 0

◆ LUCENE_SEARCH

const ilSearchSettings::LUCENE_SEARCH = 2

◆ OPERATOR_AND

◆ OPERATOR_OR

const ilSearchSettings::OPERATOR_OR = 2

Definition at line 21 of file class.ilSearchSettings.php.

Referenced by ilObjSearchSettingsGUI\initFormSettings().


The documentation for this class was generated from the following file: