ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSearchSettings Class Reference
+ Collaboration diagram for ilSearchSettings:

Public Member Functions

 __construct ()
 
 getEnabledLuceneItemFilterDefinitions ()
 Get lucene item filter definitions. More...
 
 getEnabledLuceneMimeFilterDefinitions ()
 
 enablePrefixWildcardQuery (bool $a_stat)
 
 isPrefixWildcardQueryEnabled ()
 
 enabledLucene ()
 
 enableLucene (bool $a_status)
 
 getMaxHits ()
 
 setMaxHits (int $a_max_hits)
 
 getDefaultOperator ()
 
 setDefaultOperator (int $a_op)
 
 setFragmentSize (int $a_size)
 
 getFragmentSize ()
 
 setFragmentCount (int $a_count)
 
 getHideAdvancedSearch ()
 
 setHideAdvancedSearch (bool $a_status)
 
 getAutoCompleteLength ()
 
 setAutoCompleteLength (int $auto_complete_length)
 
 getFragmentCount ()
 
 setMaxSubitems (int $a_max)
 
 getMaxSubitems ()
 
 getLastIndexTime ()
 
 enableLuceneItemFilter (bool $a_status)
 
 isLuceneItemFilterEnabled ()
 
 getLuceneItemFilter ()
 
 setLuceneItemFilter (array $a_filter)
 
 enableLuceneOfflineFilter (bool $a_stat)
 
 isLuceneOfflineFilterEnabled ()
 
 setLuceneMimeFilter (array $a_filter)
 
 getLuceneMimeFilter ()
 
 isLuceneMimeFilterEnabled ()
 Check if lucene mime filter is enabled. More...
 
 enableLuceneMimeFilter (bool $a_stat)
 
 setLastIndexTime (?ilDateTime $time)
 
 isLuceneUserSearchEnabled ()
 Check if user search is enabled. More...
 
 enableLuceneUserSearch (bool $a_status)
 Enable lucene user search. More...
 
 showInactiveUser (bool $a_visible)
 show inactive user in user search More...
 
 isInactiveUserVisible ()
 are inactive user visible in user search More...
 
 showLimitedUser (bool $a_visible)
 show user with limited access in user search More...
 
 isLimitedUserVisible ()
 
 isDateFilterEnabled ()
 
 enableDateFilter (bool $a_filter)
 
 update ()
 

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 LUCENE_SEARCH = 2
 
const OPERATOR_AND = 1
 
const OPERATOR_OR = 2
 

Protected Member Functions

 __read ()
 

Protected Attributes

int $default_operator = self::OPERATOR_AND
 
int $fragmentSize = 30
 
int $fragmentCount = 3
 
int $numSubitems = 5
 
ilDateTime $last_index_date = null
 
bool $lucene_item_filter_enabled = false
 
array $lucene_item_filter = array()
 
bool $lucene_offline_filter = true
 
int $auto_complete_length = 10
 
bool $show_inactiv_user = true
 
bool $show_limited_user = true
 
bool $lucene = false
 
bool $hide_adv_search = false
 
bool $lucene_mime_filter_enabled = false
 
array $lucene_mime_filter = array()
 
bool $prefix_wildcard = false
 
bool $user_search = false
 
bool $date_filter = false
 
ILIAS $ilias = null
 
ilSetting $setting
 

Static Protected Attributes

static ilSearchSettings $instance = null
 

Private Attributes

int $max_hits = 10
 

Detailed Description

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

Constructor & Destructor Documentation

◆ __construct()

ilSearchSettings::__construct ( )

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

References $DIC, and __read().

65  {
66  global $DIC;
67 
68  $this->ilias = $DIC['ilias'];
69  $this->setting = $DIC->settings();
70  $this->__read();
71  }
global $DIC
Definition: shib_login.php:22
Class ilObjForumAdministration.
+ Here is the call graph for this function:

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )
protected

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

References enableDateFilter(), enableLucene(), enableLuceneItemFilter(), enableLuceneMimeFilter(), enableLuceneOfflineFilter(), enableLuceneUserSearch(), enablePrefixWildcardQuery(), getLuceneItemFilter(), getLuceneMimeFilter(), IL_CAL_UNIX, null, setAutoCompleteLength(), setDefaultOperator(), setFragmentCount(), setFragmentSize(), setHideAdvancedSearch(), setLastIndexTime(), setLuceneItemFilter(), setLuceneMimeFilter(), setMaxHits(), setMaxSubitems(), showInactiveUser(), and showLimitedUser().

Referenced by __construct().

413  {
414  $this->setMaxHits((int) $this->setting->get('search_max_hits', '10'));
415  $this->enableLucene((bool) $this->setting->get('search_lucene', '0'));
416  $this->setDefaultOperator((int) $this->setting->get('lucene_default_operator', (string) self::OPERATOR_AND));
417  $this->setFragmentSize((int) $this->setting->get('lucene_fragment_size', "50"));
418  $this->setFragmentCount((int) $this->setting->get('lucene_fragment_count', "3"));
419  $this->setMaxSubitems((int) $this->setting->get('lucene_max_subitems', "5"));
420  if ($time = $this->setting->get('lucene_last_index_time', '0')) {
421  $this->setLastIndexTime(new ilDateTime($time, IL_CAL_UNIX));
422  } else {
423  $this->setLastIndexTime(null);
424  }
425  $this->setHideAdvancedSearch((bool) $this->setting->get('hide_adv_search', '0'));
426  $this->setAutoCompleteLength((int) $this->setting->get('auto_complete_length', (string) $this->getAutoCompleteLength()));
427  $this->enableLuceneItemFilter((bool) $this->setting->get('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled()));
428  $filter = (string) $this->setting->get('lucene_item_filter', serialize($this->getLuceneItemFilter()));
429  $this->setLuceneItemFilter(unserialize($filter));
430  $this->enableLuceneOfflineFilter((bool) $this->setting->get('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled()));
431  $this->enableLuceneMimeFilter((bool) $this->setting->get('lucene_mime_filter_enabled', (string) $this->lucene_item_filter_enabled));
432  $filter = (string) $this->setting->get('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
433  $this->setLuceneMimeFilter(unserialize($filter));
434  $this->enablePrefixWildcardQuery((bool) $this->setting->get('lucene_prefix_wildcard', (string) $this->prefix_wildcard));
435  $this->enableLuceneUserSearch((bool) $this->setting->get('lucene_user_search', (string) $this->user_search));
436  $this->showInactiveUser((bool) $this->setting->get('search_show_inactiv_user', (string) $this->show_inactiv_user));
437  $this->showLimitedUser((bool) $this->setting->get('search_show_limited_user', (string) $this->show_limited_user));
438  $this->enableDateFilter((bool) $this->setting->get('search_date_filter', (string) $this->date_filter));
439  }
setHideAdvancedSearch(bool $a_status)
setLuceneItemFilter(array $a_filter)
const IL_CAL_UNIX
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
setLastIndexTime(?ilDateTime $time)
setFragmentCount(int $a_count)
setLuceneMimeFilter(array $a_filter)
enablePrefixWildcardQuery(bool $a_stat)
enableLuceneUserSearch(bool $a_status)
Enable lucene user search.
setAutoCompleteLength(int $auto_complete_length)
enableLucene(bool $a_status)
showLimitedUser(bool $a_visible)
show user with limited access in user search
enableLuceneItemFilter(bool $a_status)
enableLuceneOfflineFilter(bool $a_stat)
enableDateFilter(bool $a_filter)
showInactiveUser(bool $a_visible)
show inactive user in user search
enableLuceneMimeFilter(bool $a_stat)
setMaxHits(int $a_max_hits)
+ 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()

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

References $DIC, $ilDB, $res, ilDBConstants\FETCHMODE_OBJECT, ILIAS\Repository\int(), and SYSTEM_FOLDER_ID.

Referenced by ilSearchControllerGUI\executeCommand(), and ILIAS\Search\Provider\SearchMetaBarProvider\getMetaBarItems().

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

◆ enableDateFilter()

ilSearchSettings::enableDateFilter ( bool  $a_filter)

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

Referenced by __read().

382  : void
383  {
384  $this->date_filter = $a_filter;
385  }
+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

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

References $lucene.

Referenced by update().

187  : bool
188  {
189  return $this->lucene;
190  }
+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene ( bool  $a_status)

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

Referenced by __read().

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

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter ( bool  $a_status)

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

Referenced by __read().

269  : void
270  {
271  $this->lucene_item_filter_enabled = $a_status;
272  }
+ Here is the caller graph for this function:

◆ enableLuceneMimeFilter()

ilSearchSettings::enableLuceneMimeFilter ( bool  $a_stat)

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

Referenced by __read().

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

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter ( bool  $a_stat)

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

Referenced by __read().

290  : void
291  {
292  $this->lucene_offline_filter = $a_stat;
293  }
+ Here is the caller graph for this function:

◆ enableLuceneUserSearch()

ilSearchSettings::enableLuceneUserSearch ( bool  $a_status)

Enable lucene user search.

Parameters
bool$a_status

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

Referenced by __read().

341  : void
342  {
343  $this->user_search = $a_status;
344  }
+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery ( bool  $a_stat)

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

Referenced by __read().

151  : void
152  {
153  $this->prefix_wildcard = $a_stat;
154  }
+ Here is the caller graph for this function:

◆ getAutoCompleteLength()

ilSearchSettings::getAutoCompleteLength ( )

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

References $auto_complete_length.

Referenced by update().

238  : int
239  {
241  }
+ Here is the caller graph for this function:

◆ getDefaultOperator()

ilSearchSettings::getDefaultOperator ( )

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

References $default_operator.

Referenced by update().

205  : int
206  {
208  }
+ Here is the caller graph for this function:

◆ getEnabledLuceneItemFilterDefinitions()

ilSearchSettings::getEnabledLuceneItemFilterDefinitions ( )

Get lucene item filter definitions.

Todo:
This has to be defined in module.xml

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

References getLuceneItemFilter(), and isLuceneItemFilterEnabled().

118  : array
119  {
120  if (!$this->isLuceneItemFilterEnabled()) {
121  return array();
122  }
123 
124  $filter = $this->getLuceneItemFilter();
125  $enabled = array();
126  foreach (self::getLuceneItemFilterDefinitions() as $obj => $def) {
127  if (isset($filter[$obj]) and $filter[$obj]) {
128  $enabled[$obj] = $def;
129  }
130  }
131  return $enabled;
132  }
+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

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

References getLuceneMimeFilter(), and isLuceneItemFilterEnabled().

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

◆ getFragmentCount()

ilSearchSettings::getFragmentCount ( )

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

References $fragmentCount.

Referenced by update().

247  : int
248  {
249  return $this->fragmentCount;
250  }
+ Here is the caller graph for this function:

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

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

References $fragmentSize.

Referenced by update().

220  : int
221  {
222  return $this->fragmentSize;
223  }
+ Here is the caller graph for this function:

◆ getHideAdvancedSearch()

ilSearchSettings::getHideAdvancedSearch ( )

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

References $hide_adv_search.

Referenced by update().

230  : bool
231  {
232  return $this->hide_adv_search;
233  }
+ Here is the caller graph for this function:

◆ getInstance()

static ilSearchSettings::getInstance ( )
static

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

Referenced by ilRepositoryObjectSearchResultTableGUI\__construct(), ilSearchFilterGUI\__construct(), ilRepositoryObjectDetailSearch\__construct(), ilMailAutoCompleteRecipientResult\__construct(), ilSubItemListGUI\__construct(), ilLuceneSearchResultFilter\__construct(), ilSearchGUI\__construct(), ilQueryParser\__construct(), ilMainMenuSearchGUI\buildSearchLink(), ilSearchResultTableGUI\enabledRelevance(), ilLuceneAdvancedSearchFields\getFields(), ilMailFolderGUI\getFilteredSearch(), ilMailFolderGUI\getFilterUI(), ilMainMenuSearchGUI\getHTML(), ilSearchAutoComplete\getList(), ilUserAutoComplete\getList(), ilSearchAutoComplete\getLuceneList(), ilMailForm\getRecipientAsync(), ilObjSearchLuceneSettingsFormGUI\getSettings(), ilObjSearchSettingsFormGUI\getSettings(), ilLuceneUserSearchGUI\getTabs(), ilLuceneAdvancedSearchGUI\getTabs(), ilLuceneSearchGUI\getTabs(), ilUserAutoComplete\getWherePart(), ilSearchBaseGUI\initStandardSearchForm(), ilLuceneSearchGUI\initUserSearchCache(), ilMailLuceneQueryParser\parse(), ilRepositoryUserResultTableGUI\parseUserIds(), ilAdvancedSearchGUI\performSearch(), ilLuceneSearchGUI\performSearch(), ilSearchGUI\performSearch(), ilSoapObjectAdministration\searchObjects(), and ilLuceneIndexer\updateLuceneIndex().

74  {
75  if (self::$instance instanceof ilSearchSettings) {
76  return self::$instance;
77  }
78  return self::$instance = new ilSearchSettings();
79  }
+ Here is the caller graph for this function:

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

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

References IL_CAL_DATETIME.

Referenced by update().

262  : ilDateTime
263  {
264  return $this->last_index_date instanceof ilDateTime ?
265  $this->last_index_date :
266  new ilDateTime('2009-01-01 12:00:00', IL_CAL_DATETIME);
267  }
const IL_CAL_DATETIME
+ Here is the caller graph for this function:

◆ getLuceneItemFilter()

ilSearchSettings::getLuceneItemFilter ( )

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

References $lucene_item_filter.

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

279  : array
280  {
282  }
+ Here is the caller graph for this function:

◆ getLuceneItemFilterDefinitions()

static ilSearchSettings::getLuceneItemFilterDefinitions ( )
static

Get lucene item filter definitions.

Todo:
This has to be defined in module.xml

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

Referenced by ilObjSearchSettingsFormGUI\initForm().

85  : array
86  {
87  return array(
88  'crs' => array('filter' => 'type:crs','trans' => 'objs_crs'),
89  'grp' => array('filter' => 'type:grp', 'trans' => 'objs_grp'),
90  'lms' => array('filter' => 'type:lm OR type:htlm','trans' => 'obj_lrss'),
91  'glo' => array('filter' => 'type:glo','trans' => 'objs_glo'),
92  'mep' => array('filter' => 'type:mep', 'trans' => 'objs_mep'),
93  'tst' => array('filter' => 'type:tst OR type:svy OR type:qpl OR type:spl','trans' => 'search_tst_svy'),
94  'frm' => array('filter' => 'type:frm','trans' => 'objs_frm'),
95  'exc' => array('filter' => 'type:exc','trans' => 'objs_exc'),
96  'file' => array('filter' => 'type:file','trans' => 'objs_file'),
97  'mcst' => array('filter' => 'type:mcst','trans' => 'objs_mcst'),
98  'wiki' => array('filter' => 'type:wiki','trans' => 'objs_wiki'),
99  'copa' => array('filter' => 'type:copa','trans' => 'objs_copa'),
100  );
101  }
+ Here is the caller graph for this function:

◆ getLuceneMimeFilter()

ilSearchSettings::getLuceneMimeFilter ( )

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

References $lucene_mime_filter.

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

305  : array
306  {
308  }
+ Here is the caller graph for this function:

◆ getLuceneMimeFilterDefinitions()

static ilSearchSettings::getLuceneMimeFilterDefinitions ( )
static

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

Referenced by ilObjSearchLuceneSettingsFormGUI\initForm().

103  : array
104  {
105  return array(
106  'pdf' => array('filter' => 'mimeType:pdf','trans' => 'search_mime_pdf'),
107  'word' => array('filter' => 'mimeType:word','trans' => 'search_mime_word'),
108  'excel' => array('filter' => 'mimeType:excel','trans' => 'search_mime_excel'),
109  'powerpoint' => array('filter' => 'mimeType:powerpoint','trans' => 'search_mime_powerpoint'),
110  'image' => array('filter' => 'mimeType:image','trans' => 'search_mime_image')
111  );
112  }
+ Here is the caller graph for this function:

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

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

References $max_hits.

Referenced by update().

196  : int
197  {
198  return $this->max_hits;
199  }
+ Here is the caller graph for this function:

◆ getMaxSubitems()

ilSearchSettings::getMaxSubitems ( )

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

References $numSubitems.

Referenced by update().

257  : int
258  {
259  return $this->numSubitems;
260  }
+ Here is the caller graph for this function:

◆ isDateFilterEnabled()

ilSearchSettings::isDateFilterEnabled ( )

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

References $date_filter.

Referenced by update().

377  : bool
378  {
379  return $this->date_filter;
380  }
+ Here is the caller graph for this function:

◆ isInactiveUserVisible()

ilSearchSettings::isInactiveUserVisible ( )

are inactive user visible in user search

Returns
bool

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

References $show_inactiv_user.

Referenced by update().

358  : bool
359  {
361  }
+ Here is the caller graph for this function:

◆ isLimitedUserVisible()

ilSearchSettings::isLimitedUserVisible ( )

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

References $show_limited_user.

Referenced by update().

372  : bool
373  {
375  }
+ Here is the caller graph for this function:

◆ isLuceneItemFilterEnabled()

ilSearchSettings::isLuceneItemFilterEnabled ( )

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

References $lucene_item_filter_enabled.

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

274  : bool
275  {
277  }
+ Here is the caller graph for this function:

◆ isLuceneMimeFilterEnabled()

ilSearchSettings::isLuceneMimeFilterEnabled ( )

Check if lucene mime filter is enabled.

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

References $lucene_mime_filter_enabled.

Referenced by update().

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

◆ isLuceneOfflineFilterEnabled()

ilSearchSettings::isLuceneOfflineFilterEnabled ( )

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

References $lucene_offline_filter.

Referenced by update().

295  : bool
296  {
298  }
+ Here is the caller graph for this function:

◆ isLuceneUserSearchEnabled()

ilSearchSettings::isLuceneUserSearchEnabled ( )

Check if user search is enabled.

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

References $user_search.

Referenced by update().

332  : bool
333  {
334  return $this->user_search;
335  }
+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

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

References $prefix_wildcard.

Referenced by update().

156  : bool
157  {
158  return $this->prefix_wildcard;
159  }
+ Here is the caller graph for this function:

◆ setAutoCompleteLength()

ilSearchSettings::setAutoCompleteLength ( int  $auto_complete_length)

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

References $auto_complete_length.

Referenced by __read().

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

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator ( int  $a_op)

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

Referenced by __read().

210  : void
211  {
212  $this->default_operator = $a_op;
213  }
+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount ( int  $a_count)

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

Referenced by __read().

225  : void
226  {
227  $this->fragmentCount = $a_count;
228  }
+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize ( int  $a_size)

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

Referenced by __read().

215  : void
216  {
217  $this->fragmentSize = $a_size;
218  }
+ Here is the caller graph for this function:

◆ setHideAdvancedSearch()

ilSearchSettings::setHideAdvancedSearch ( bool  $a_status)

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

Referenced by __read().

234  : void
235  {
236  $this->hide_adv_search = $a_status;
237  }
+ Here is the caller graph for this function:

◆ setLastIndexTime()

ilSearchSettings::setLastIndexTime ( ?ilDateTime  $time)

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

Referenced by __read().

324  : void
325  {
326  $this->last_index_date = $time;
327  }
+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter ( array  $a_filter)

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

Referenced by __read().

285  : void
286  {
287  $this->lucene_item_filter = $a_filter;
288  }
+ Here is the caller graph for this function:

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter ( array  $a_filter)

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

Referenced by __read().

300  : void
301  {
302  $this->lucene_mime_filter = $a_filter;
303  }
+ Here is the caller graph for this function:

◆ setMaxHits()

ilSearchSettings::setMaxHits ( int  $a_max_hits)

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

Referenced by __read().

200  : void
201  {
202  $this->max_hits = $a_max_hits;
203  }
+ Here is the caller graph for this function:

◆ setMaxSubitems()

ilSearchSettings::setMaxSubitems ( int  $a_max)

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

Referenced by __read().

252  : void
253  {
254  $this->numSubitems = $a_max;
255  }
+ Here is the caller graph for this function:

◆ showInactiveUser()

ilSearchSettings::showInactiveUser ( bool  $a_visible)

show inactive user in user search

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

Referenced by __read().

349  : void
350  {
351  $this->show_inactiv_user = $a_visible;
352  }
+ Here is the caller graph for this function:

◆ showLimitedUser()

ilSearchSettings::showLimitedUser ( bool  $a_visible)

show user with limited access in user search

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

Referenced by __read().

366  : void
367  {
368  $this->show_limited_user = $a_visible;
369  }
+ Here is the caller graph for this function:

◆ update()

ilSearchSettings::update ( )

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

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

387  : void
388  {
389  $this->setting->set('search_max_hits', (string) $this->getMaxHits());
390  $this->setting->set('search_lucene', (string) $this->enabledLucene());
391 
392  $this->setting->set('lucene_default_operator', (string) $this->getDefaultOperator());
393  $this->setting->set('lucene_fragment_size', (string) $this->getFragmentSize());
394  $this->setting->set('lucene_fragment_count', (string) $this->getFragmentCount());
395  $this->setting->set('lucene_max_subitems', (string) $this->getMaxSubitems());
396  $this->setting->set('lucene_last_index_time', (string) $this->getLastIndexTime()->get(IL_CAL_UNIX));
397  $this->setting->set('hide_adv_search', (string) $this->getHideAdvancedSearch());
398  $this->setting->set('auto_complete_length', (string) $this->getAutoCompleteLength());
399  $this->setting->set('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled());
400  $this->setting->set('lucene_item_filter', serialize($this->getLuceneItemFilter()));
401  $this->setting->set('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled());
402  $this->setting->set('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
403  $this->setting->set('lucene_mime_filter_enabled', (string) $this->isLuceneMimeFilterEnabled());
404  $this->setting->set('lucene_prefix_wildcard', (string) $this->isPrefixWildcardQueryEnabled());
405  $this->setting->set('lucene_user_search', (string) $this->isLuceneUserSearchEnabled());
406  $this->setting->set('search_show_inactiv_user', (string) $this->isInactiveUserVisible());
407  $this->setting->set('search_show_limited_user', (string) $this->isLimitedUserVisible());
408  $this->setting->set('search_date_filter', (string) $this->isDateFilterEnabled());
409  }
isLuceneMimeFilterEnabled()
Check if lucene mime filter is enabled.
isInactiveUserVisible()
are inactive user visible in user search
const IL_CAL_UNIX
isLuceneUserSearchEnabled()
Check if user search is enabled.
+ Here is the call graph for this function:

Field Documentation

◆ $auto_complete_length

int ilSearchSettings::$auto_complete_length = 10
protected

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

Referenced by getAutoCompleteLength(), and setAutoCompleteLength().

◆ $date_filter

bool ilSearchSettings::$date_filter = false
protected

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

Referenced by isDateFilterEnabled().

◆ $default_operator

int ilSearchSettings::$default_operator = self::OPERATOR_AND
protected

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

Referenced by getDefaultOperator().

◆ $fragmentCount

int ilSearchSettings::$fragmentCount = 3
protected

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

Referenced by getFragmentCount().

◆ $fragmentSize

int ilSearchSettings::$fragmentSize = 30
protected

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

Referenced by getFragmentSize().

◆ $hide_adv_search

bool ilSearchSettings::$hide_adv_search = false
protected

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

Referenced by getHideAdvancedSearch().

◆ $ilias

ILIAS ilSearchSettings::$ilias = null
protected

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

◆ $instance

ilSearchSettings ilSearchSettings::$instance = null
staticprotected

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

◆ $last_index_date

ilDateTime ilSearchSettings::$last_index_date = null
protected

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

◆ $lucene

bool ilSearchSettings::$lucene = false
protected

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

Referenced by enabledLucene().

◆ $lucene_item_filter

array ilSearchSettings::$lucene_item_filter = array()
protected

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

Referenced by getLuceneItemFilter().

◆ $lucene_item_filter_enabled

bool ilSearchSettings::$lucene_item_filter_enabled = false
protected

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

Referenced by isLuceneItemFilterEnabled().

◆ $lucene_mime_filter

array ilSearchSettings::$lucene_mime_filter = array()
protected

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

Referenced by getLuceneMimeFilter().

◆ $lucene_mime_filter_enabled

bool ilSearchSettings::$lucene_mime_filter_enabled = false
protected

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

Referenced by isLuceneMimeFilterEnabled().

◆ $lucene_offline_filter

bool ilSearchSettings::$lucene_offline_filter = true
protected

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

Referenced by isLuceneOfflineFilterEnabled().

◆ $max_hits

int ilSearchSettings::$max_hits = 10
private

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

Referenced by getMaxHits().

◆ $numSubitems

int ilSearchSettings::$numSubitems = 5
protected

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

Referenced by getMaxSubitems().

◆ $prefix_wildcard

bool ilSearchSettings::$prefix_wildcard = false
protected

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

Referenced by isPrefixWildcardQueryEnabled().

◆ $setting

ilSetting ilSearchSettings::$setting
protected

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

◆ $show_inactiv_user

bool ilSearchSettings::$show_inactiv_user = true
protected

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

Referenced by isInactiveUserVisible().

◆ $show_limited_user

bool ilSearchSettings::$show_limited_user = true
protected

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

Referenced by isLimitedUserVisible().

◆ $user_search

bool ilSearchSettings::$user_search = false
protected

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

Referenced by isLuceneUserSearchEnabled().

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

Referenced by ilObjSearchSettingsFormGUI\initForm().


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