ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilSearchSettings Class Reference
+ Collaboration diagram for ilSearchSettings:

Public Member Functions

 __construct ()
 
 getEnabledLuceneItemFilterDefinitions ()
 Get lucene item filter definitions. More...
 
 getEnabledLuceneMimeFilterDefinitions ()
 
 enablePrefixWildcardQuery ($a_stat)
 
 isPrefixWildcardQueryEnabled ()
 
 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...
 
 showInactiveUser ($a_visible)
 show inactive user in user search More...
 
 isInactiveUserVisible ()
 are inactive user visible in user search More...
 
 showLimitedUser ($a_visible)
 show user with limited access in user search More...
 
 isLimitedUserVisible ()
 are user with limited access visible in user search More...
 
 isDateFilterEnabled ()
 
 enableDateFilter ($a_filter)
 
 update ()
 
 __read ()
 

Static Public Member Functions

static getInstance ()
 
static getLuceneItemFilterDefinitions ()
 Get lucene item filter definitions. More...
 
static getLuceneMimeFilterDefinitions ()
 
static _getSearchSettingRefId ()
 Read the ref_id of Search Settings object. More...
 

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
 
 $show_inactiv_user = true
 
 $show_limited_user = true
 
 $lucene_mime_filter_enabled = false
 
 $lucene_mime_filter = array()
 
 $showSubRelevance = false
 
 $prefix_wildcard = false
 
 $user_search = false
 
 $date_filter = false
 

Static Protected Attributes

static $instance = null
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilSearchSettings::__construct ( )

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

References $ilias, and __read().

52  {
53  global $ilias;
54 
55  $this->ilias = $ilias;
56  $this->__read();
57  }
redirection script todo: (a better solution should control the processing via a xml file) ...
+ Here is the call graph for this function:

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )

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

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

Referenced by __construct().

467  {
468  global $ilSetting;
469 
470  $this->setMaxHits($this->ilias->getSetting('search_max_hits', 10));
471  $this->enableIndex($this->ilias->getSetting('search_index', 0));
472  $this->enableLucene($this->ilias->getSetting('search_lucene', 0));
473 
474  $this->setDefaultOperator($this->ilias->getSetting('lucene_default_operator', self::OPERATOR_AND));
475  $this->setFragmentSize($this->ilias->getSetting('lucene_fragment_size', 50));
476  $this->setFragmentCount($this->ilias->getSetting('lucene_fragment_count', 3));
477  $this->setMaxSubitems($this->ilias->getSetting('lucene_max_subitems', 5));
478  $this->showRelevance($this->ilias->getSetting('lucene_show_relevance', true));
479 
480  if ($time = $this->ilias->getSetting('lucene_last_index_time', false)) {
482  } else {
483  $this->setLastIndexTime(null);
484  }
485 
486  $this->setHideAdvancedSearch($this->ilias->getSetting('hide_adv_search', 0));
487  $this->setAutoCompleteLength($this->ilias->getSetting('auto_complete_length', $this->getAutoCompleteLength()));
488 
489  $this->enableLuceneItemFilter($this->ilias->getSetting('lucene_item_filter_enabled', (int) $this->isLuceneItemFilterEnabled()));
490 
491  $filter = $this->ilias->getSetting('lucene_item_filter', serialize($this->getLuceneItemFilter()));
492  $this->setLuceneItemFilter(unserialize($filter));
493  $this->enableLuceneOfflineFilter($this->ilias->getSetting('lucene_offline_filter'), $this->isLuceneOfflineFilterEnabled());
494 
495  $this->enableLuceneMimeFilter($ilSetting->get('lucene_mime_filter_enabled', $this->lucene_item_filter_enabled));
496  $filter = $this->ilias->getSetting('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
497  $this->setLuceneMimeFilter(unserialize($filter));
498  $this->showSubRelevance($this->ilias->getSetting('lucene_sub_relevance', $this->showSubRelevance));
499  $this->enablePrefixWildcardQuery($this->ilias->getSetting('lucene_prefix_wildcard', $this->prefix_wildcard));
500  $this->enableLuceneUserSearch($ilSetting->get('lucene_user_search', $this->user_search));
501 
502  $this->showInactiveUser($ilSetting->get('search_show_inactiv_user', $this->show_inactiv_user));
503  $this->showLimitedUser($ilSetting->get('search_show_limited_user', $this->show_limited_user));
504 
505  $this->enableDateFilter($ilSetting->get('search_date_filter', $this->date_filter));
506  }
setAutoCompleteLength($auto_complete_length)
const IL_CAL_UNIX
$time
Definition: cron.php:21
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.
showLimitedUser($a_visible)
show user with limited access in user search
showInactiveUser($a_visible)
show inactive user in user search
global $ilSetting
Definition: privfeed.php:17
enableLuceneUserSearch($a_status)
Enable lucene user search.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _getSearchSettingRefId()

static ilSearchSettings::_getSearchSettingRefId ( )
static

Read the ref_id of Search Settings object.

normally used for rbacsystem->checkAccess()

Returns
int ref_id public

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

References $ilDB, $query, $res, $row, and ilDBConstants\FETCHMODE_OBJECT.

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

162  {
163  global $ilDB;
164 
165  static $seas_ref_id = 0;
166 
167  if ($seas_ref_id) {
168  return $seas_ref_id;
169  }
170  $query = "SELECT object_reference.ref_id as ref_id FROM object_reference,tree,object_data " .
171  "WHERE tree.parent = " . $ilDB->quote(SYSTEM_FOLDER_ID, 'integer') . " " .
172  "AND object_data.type = 'seas' " .
173  "AND object_reference.ref_id = tree.child " .
174  "AND object_reference.obj_id = object_data.obj_id";
175 
176  $res = $ilDB->query($query);
178 
179  return $seas_ref_id = $row->ref_id;
180  }
foreach($_POST as $key=> $value) $res
$query
global $ilDB
+ Here is the caller graph for this function:

◆ enableDateFilter()

ilSearchSettings::enableDateFilter (   $a_filter)

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

Referenced by __read().

429  {
430  $this->date_filter = $a_filter;
431  }
+ Here is the caller graph for this function:

◆ enabledIndex()

ilSearchSettings::enabledIndex ( )

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

References $ilDB.

Referenced by update().

183  {
184  global $ilDB;
185 
186  if ($ilDB->getDBType() == 'oracle') {
187  return false;
188  }
189  return $this->index ? true : false;
190  }
global $ilDB
+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

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

Referenced by update().

196  {
197  return $this->lucene ? true : false;
198  }
+ Here is the caller graph for this function:

◆ enableIndex()

ilSearchSettings::enableIndex (   $a_status)

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

Referenced by __read().

192  {
193  $this->index = $a_status;
194  }
+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene (   $a_status)

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

Referenced by __read().

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

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter (   $a_status)

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

Referenced by __read().

288  {
289  $this->lucene_item_filter_enabled = $a_status;
290  }
+ Here is the caller graph for this function:

◆ enableLuceneMimeFilter()

ilSearchSettings::enableLuceneMimeFilter (   $a_stat)

Enable lucene mime filter.

Parameters
type$a_stat

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

Referenced by __read().

352  {
353  $this->lucene_mime_filter_enabled = $a_stat;
354  }
+ Here is the caller graph for this function:

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter (   $a_stat)

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

Referenced by __read().

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

◆ enableLuceneUserSearch()

ilSearchSettings::enableLuceneUserSearch (   $a_status)

Enable lucene user search.

Parameters
type$a_status

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

Referenced by __read().

379  {
380  $this->user_search = $a_status;
381  }
+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery (   $a_stat)

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

Referenced by __read().

145  {
146  $this->prefix_wildcard = $a_stat;
147  }
+ Here is the caller graph for this function:

◆ getAutoCompleteLength()

ilSearchSettings::getAutoCompleteLength ( )

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

References $auto_complete_length.

Referenced by update().

247  {
249  }
+ Here is the caller graph for this function:

◆ getDefaultOperator()

ilSearchSettings::getDefaultOperator ( )

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

References $default_operator.

Referenced by update().

214  {
216  }
+ 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 111 of file class.ilSearchSettings.php.

References $def, array, getLuceneItemFilter(), and isLuceneItemFilterEnabled().

112  {
113  if (!$this->isLuceneItemFilterEnabled()) {
114  return array();
115  }
116 
117  $filter = $this->getLuceneItemFilter();
118  $enabled = array();
119  foreach (self::getLuceneItemFilterDefinitions() as $obj => $def) {
120  if (isset($filter[$obj]) and $filter[$obj]) {
121  $enabled[$obj] = $def;
122  }
123  }
124  return $enabled;
125  }
Create styles array
The data for the language used.
$def
Definition: croninfo.php:21
+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

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

References $def, array, getLuceneMimeFilter(), and isLuceneItemFilterEnabled().

129  {
130  if (!$this->isLuceneItemFilterEnabled()) {
131  return array();
132  }
133 
134  $filter = $this->getLuceneMimeFilter();
135  $enabled = array();
136  foreach (self::getLuceneMimeFilterDefinitions() as $mime => $def) {
137  if (isset($filter[$mime]) and $filter[$mime]) {
138  $enabled[$mime] = $def;
139  }
140  }
141  return $enabled;
142  }
Create styles array
The data for the language used.
$def
Definition: croninfo.php:21
+ Here is the call graph for this function:

◆ getFragmentCount()

ilSearchSettings::getFragmentCount ( )

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

References $fragmentCount.

Referenced by update().

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

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

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

References $fragmentSize.

Referenced by update().

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

◆ getHideAdvancedSearch()

ilSearchSettings::getHideAdvancedSearch ( )

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

Referenced by update().

239  {
240  return $this->hide_adv_search ? true : false;
241  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilSearchSettings::getInstance ( )
static
Returns
ilSearchSettings

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

Referenced by ilRepositoryObjectSearchResultTableGUI\__construct(), ilMailAutoCompleteRecipientResult\__construct(), ilRepositoryObjectDetailSearch\__construct(), ilSearchGUI\__construct(), ilLuceneSearchResultFilter\__construct(), ilQueryParser\__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(), ilUserAutoComplete\getSelectPart(), ilLuceneUserSearchGUI\getTabs(), ilLuceneAdvancedSearchGUI\getTabs(), ilLuceneSearchGUI\getTabs(), ilObjSearchSettingsGUI\initFormLuceneSettings(), ilSearchBaseGUI\initStandardSearchForm(), ilLuceneSearchGUI\initUserSearchCache(), ilMailFolderTableGUI\isLuceneSearchEnabled(), ilBlogPostingGUI\keywordAutocomplete(), ilSubItemListGUI\parseRelevance(), ilRepositoryUserResultTableGUI\parseUserIds(), ilAdvancedSearchGUI\performSearch(), ilLuceneSearchGUI\performSearch(), ilObjSearchSettingsGUI\refreshLuceneSettings(), ilObjSearchSettingsGUI\saveLuceneSettingsObject(), ilSoapObjectAdministration\searchObjects(), ilUserAutoComplete\setResultField(), ilSearchGUI\showSearch(), ilLuceneSearchGUI\showSearchForm(), ilLuceneIndexer\updateLuceneIndex(), and ilObjSearchSettingsGUI\updateSettingsObject().

66  {
67  if (self::$instance == null) {
68  return self::$instance = new ilSearchSettings();
69  }
70  return self::$instance;
71  }
+ Here is the caller graph for this function:

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

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

References IL_CAL_DATETIME.

Referenced by update().

281  {
282  return $this->last_index_date instanceof ilDateTime ?
283  $this->last_index_date :
284  new ilDateTime('2009-01-01 12:00:00', IL_CAL_DATETIME);
285  }
const IL_CAL_DATETIME
Date and time handling
+ Here is the caller graph for this function:

◆ getLuceneItemFilter()

ilSearchSettings::getLuceneItemFilter ( )

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

References $lucene_item_filter.

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

298  {
300  }
+ 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 78 of file class.ilSearchSettings.php.

References array.

Referenced by ilObjSearchSettingsGUI\initFormSettings().

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

◆ getLuceneMimeFilter()

ilSearchSettings::getLuceneMimeFilter ( )

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

References $lucene_mime_filter.

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

335  {
337  }
+ Here is the caller graph for this function:

◆ getLuceneMimeFilterDefinitions()

static ilSearchSettings::getLuceneMimeFilterDefinitions ( )
static

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

References array.

Referenced by ilObjSearchSettingsGUI\initFormLuceneSettings().

96  {
97  return array(
98  'pdf' => array('filter' => 'mimeType:pdf','trans' => 'search_mime_pdf'),
99  'word' => array('filter' => 'mimeType:word','trans' => 'search_mime_word'),
100  'excel' => array('filter' => 'mimeType:excel','trans' => 'search_mime_excel'),
101  'powerpoint' => array('filter' => 'mimeType:powerpoint','trans' => 'search_mime_powerpoint'),
102  'image' => array('filter' => 'mimeType:image','trans' => 'search_mime_image')
103  );
104  }
Create styles array
The data for the language used.
+ Here is the caller graph for this function:

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

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

References $max_hits.

Referenced by update().

205  {
206  return $this->max_hits;
207  }
+ Here is the caller graph for this function:

◆ getMaxSubitems()

ilSearchSettings::getMaxSubitems ( )

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

References $numSubitems.

Referenced by update().

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

◆ isDateFilterEnabled()

ilSearchSettings::isDateFilterEnabled ( )

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

References $date_filter.

Referenced by update().

424  {
425  return $this->date_filter;
426  }
+ Here is the caller graph for this function:

◆ isInactiveUserVisible()

ilSearchSettings::isInactiveUserVisible ( )

are inactive user visible in user search

Returns
bool

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

References $show_inactiv_user.

Referenced by update().

399  {
401  }
+ Here is the caller graph for this function:

◆ isLimitedUserVisible()

ilSearchSettings::isLimitedUserVisible ( )

are user with limited access visible in user search

Returns
bool

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

References $show_limited_user.

Referenced by update().

419  {
421  }
+ Here is the caller graph for this function:

◆ isLuceneItemFilterEnabled()

ilSearchSettings::isLuceneItemFilterEnabled ( )

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

References $lucene_item_filter_enabled.

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

293  {
295  }
+ Here is the caller graph for this function:

◆ isLuceneMimeFilterEnabled()

ilSearchSettings::isLuceneMimeFilterEnabled ( )

Check if lucene mime filter is enabled.

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

References $lucene_mime_filter_enabled.

Referenced by update().

343  {
345  }
+ Here is the caller graph for this function:

◆ isLuceneOfflineFilterEnabled()

ilSearchSettings::isLuceneOfflineFilterEnabled ( )

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

References $lucene_offline_filter.

Referenced by __read(), and update().

314  {
316  }
+ Here is the caller graph for this function:

◆ isLuceneUserSearchEnabled()

ilSearchSettings::isLuceneUserSearchEnabled ( )

Check if user search is enabled.

Returns
type

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

References $user_search.

Referenced by update().

370  {
371  return $this->user_search;
372  }
+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

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

References $prefix_wildcard.

Referenced by update().

150  {
151  return $this->prefix_wildcard;
152  }
+ Here is the caller graph for this function:

◆ isRelevanceVisible()

ilSearchSettings::isRelevanceVisible ( )

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

References $showRelevance.

Referenced by update().

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

◆ isSubRelevanceVisible()

ilSearchSettings::isSubRelevanceVisible ( )

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

References $showSubRelevance.

Referenced by update().

324  {
326  }
+ Here is the caller graph for this function:

◆ setAutoCompleteLength()

ilSearchSettings::setAutoCompleteLength (   $auto_complete_length)

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

References $auto_complete_length.

Referenced by __read().

251  {
252  $this->auto_complete_length = $auto_complete_length;
253  }
+ Here is the caller graph for this function:

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator (   $a_op)

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

Referenced by __read().

219  {
220  $this->default_operator = $a_op;
221  }
+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount (   $a_count)

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

Referenced by __read().

234  {
235  $this->fragmentCount = $a_count;
236  }
+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize (   $a_size)

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

Referenced by __read().

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

◆ setHideAdvancedSearch()

ilSearchSettings::setHideAdvancedSearch (   $a_status)

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

Referenced by __read().

243  {
244  $this->hide_adv_search = $a_status;
245  }
+ Here is the caller graph for this function:

◆ setLastIndexTime()

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

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

References $time.

Referenced by __read().

361  {
362  $this->last_index_date = $time;
363  }
$time
Definition: cron.php:21
+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter (   $a_filter)

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

Referenced by __read().

304  {
305  $this->lucene_item_filter = $a_filter;
306  }
+ Here is the caller graph for this function:

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter (   $a_filter)

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

Referenced by __read().

330  {
331  $this->lucene_mime_filter = $a_filter;
332  }
+ Here is the caller graph for this function:

◆ setMaxHits()

ilSearchSettings::setMaxHits (   $a_max_hits)

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

Referenced by __read().

209  {
210  $this->max_hits = $a_max_hits;
211  }
+ Here is the caller graph for this function:

◆ setMaxSubitems()

ilSearchSettings::setMaxSubitems (   $a_max)

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

Referenced by __read().

261  {
262  $this->numSubitems = $a_max;
263  }
+ Here is the caller graph for this function:

◆ showInactiveUser()

ilSearchSettings::showInactiveUser (   $a_visible)

show inactive user in user search

Parameters
bool$a_visible

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

Referenced by __read().

389  {
390  $this->show_inactiv_user = (bool) $a_visible;
391  }
+ Here is the caller graph for this function:

◆ showLimitedUser()

ilSearchSettings::showLimitedUser (   $a_visible)

show user with limited access in user search

Parameters
bool$a_visible

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

Referenced by __read().

409  {
410  $this->show_limited_user = (bool) $a_visible;
411  }
+ Here is the caller graph for this function:

◆ showRelevance()

ilSearchSettings::showRelevance (   $a_status)

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

Referenced by __read().

276  {
277  $this->showRelevance = (bool) $a_status;
278  }
+ Here is the caller graph for this function:

◆ showSubRelevance()

ilSearchSettings::showSubRelevance (   $a_stat)

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

Referenced by __read().

319  {
320  $this->showSubRelevance = $a_stat;
321  }
+ Here is the caller graph for this function:

◆ update()

ilSearchSettings::update ( )

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

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

434  {
435  global $ilSetting;
436 
437  $this->ilias->setSetting('search_max_hits', $this->getMaxHits());
438  $this->ilias->setSetting('search_index', (int) $this->enabledIndex());
439  $this->ilias->setSetting('search_lucene', (int) $this->enabledLucene());
440 
441  $this->ilias->setSetting('lucene_default_operator', $this->getDefaultOperator());
442  $this->ilias->setSetting('lucene_fragment_size', $this->getFragmentSize());
443  $this->ilias->setSetting('lucene_fragment_count', $this->getFragmentCount());
444  $this->ilias->setSetting('lucene_max_subitems', $this->getMaxSubitems());
445  $this->ilias->setSetting('lucene_show_relevance', $this->isRelevanceVisible());
446  $this->ilias->setSetting('lucene_last_index_time', $this->getLastIndexTime()->get(IL_CAL_UNIX));
447  $this->ilias->setSetting('hide_adv_search', (int) $this->getHideAdvancedSearch());
448  $this->ilias->setSetting('auto_complete_length', (int) $this->getAutoCompleteLength());
449  $this->ilias->setSetting('lucene_item_filter_enabled', (int) $this->isLuceneItemFilterEnabled());
450  $this->ilias->setSetting('lucene_item_filter', serialize($this->getLuceneItemFilter()));
451  $this->ilias->setSetting('lucene_offline_filter', (int) $this->isLuceneOfflineFilterEnabled());
452  $this->ilias->setSetting('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
453  $this->ilias->setSetting('lucene_sub_relevance', $this->isSubRelevanceVisible());
454  $ilSetting->set('lucene_mime_filter_enabled', $this->isLuceneMimeFilterEnabled());
455  $this->ilias->setSetting('lucene_prefix_wildcard', $this->isPrefixWildcardQueryEnabled());
456  $ilSetting->set('lucene_user_search', $this->isLuceneUserSearchEnabled());
457  $ilSetting->set('search_show_inactiv_user', $this->isInactiveUserVisible());
458  $ilSetting->set('search_show_limited_user', $this->isLimitedUserVisible());
459 
460  $ilSetting->set('search_date_filter', $this->isDateFilterEnabled());
461 
462  return true;
463  }
isLuceneMimeFilterEnabled()
Check if lucene mime filter is enabled.
isInactiveUserVisible()
are inactive user visible in user search
const IL_CAL_UNIX
redirection script todo: (a better solution should control the processing via a xml file) ...
isLimitedUserVisible()
are user with limited access visible in user search
isLuceneUserSearchEnabled()
Check if user search is enabled.
global $ilSetting
Definition: privfeed.php:17
+ 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().

◆ $date_filter

ilSearchSettings::$date_filter = false
protected

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

Referenced by isDateFilterEnabled().

◆ $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 47 of file class.ilSearchSettings.php.

Referenced by __construct().

◆ $index

ilSearchSettings::$index = null

Definition at line 49 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 39 of file class.ilSearchSettings.php.

Referenced by getLuceneMimeFilter().

◆ $lucene_mime_filter_enabled

ilSearchSettings::$lucene_mime_filter_enabled = false
protected

Definition at line 38 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 48 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 41 of file class.ilSearchSettings.php.

Referenced by isPrefixWildcardQueryEnabled().

◆ $show_inactiv_user

ilSearchSettings::$show_inactiv_user = true
protected

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

Referenced by isInactiveUserVisible().

◆ $show_limited_user

ilSearchSettings::$show_limited_user = true
protected

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

Referenced by isLimitedUserVisible().

◆ $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 40 of file class.ilSearchSettings.php.

Referenced by isSubRelevanceVisible().

◆ $user_search

ilSearchSettings::$user_search = false
protected

Definition at line 43 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: