ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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)
 
 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)
 
 showInactiveUser (bool $a_visible)
 show inactive user in user search More...
 
 isInactiveUserVisible ()
 
 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 int LIKE_SEARCH = 0
 
const int LUCENE_SEARCH = 2
 
const int OPERATOR_AND = 1
 
const int 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 $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

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om

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

Constructor & Destructor Documentation

◆ __construct()

ilSearchSettings::__construct ( )

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

References $DIC, and __read().

58  {
59  global $DIC;
60 
61  $this->ilias = $DIC['ilias'];
62  $this->setting = $DIC->settings();
63  $this->__read();
64  }
global $DIC
Definition: shib_login.php:26
Class ilObjForumAdministration.
+ Here is the call graph for this function:

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )
protected

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

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

Referenced by __construct().

387  {
388  $this->setMaxHits((int) $this->setting->get('search_max_hits', '10'));
389  $this->enableLucene((bool) $this->setting->get('search_lucene', '0'));
390  $this->setDefaultOperator((int) $this->setting->get('lucene_default_operator', (string) self::OPERATOR_AND));
391  $this->setFragmentSize((int) $this->setting->get('lucene_fragment_size', "50"));
392  $this->setFragmentCount((int) $this->setting->get('lucene_fragment_count', "3"));
393  $this->setMaxSubitems((int) $this->setting->get('lucene_max_subitems', "5"));
394  if ($time = $this->setting->get('lucene_last_index_time', '0')) {
395  $this->setLastIndexTime(new ilDateTime($time, IL_CAL_UNIX));
396  } else {
397  $this->setLastIndexTime(null);
398  }
399  $this->setAutoCompleteLength((int) $this->setting->get('auto_complete_length', (string) $this->getAutoCompleteLength()));
400  $this->enableLuceneItemFilter((bool) $this->setting->get('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled()));
401  $filter = (string) $this->setting->get('lucene_item_filter', serialize($this->getLuceneItemFilter()));
402  $this->setLuceneItemFilter(unserialize($filter));
403  $this->enableLuceneOfflineFilter((bool) $this->setting->get('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled()));
404  $this->enableLuceneMimeFilter((bool) $this->setting->get('lucene_mime_filter_enabled', (string) $this->lucene_item_filter_enabled));
405  $filter = (string) $this->setting->get('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
406  $this->setLuceneMimeFilter(unserialize($filter));
407  $this->enablePrefixWildcardQuery((bool) $this->setting->get('lucene_prefix_wildcard', (string) $this->prefix_wildcard));
408  $this->enableLuceneUserSearch((bool) $this->setting->get('lucene_user_search', (string) $this->user_search));
409  $this->showInactiveUser((bool) $this->setting->get('search_show_inactiv_user', (string) $this->show_inactiv_user));
410  $this->showLimitedUser((bool) $this->setting->get('search_show_limited_user', (string) $this->show_limited_user));
411  $this->enableDateFilter((bool) $this->setting->get('search_date_filter', (string) $this->date_filter));
412  }
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)
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 156 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().

156  : int
157  {
158  global $DIC;
159 
160  $ilDB = $DIC->database();
161 
162  static $seas_ref_id = 0;
163 
164  if ($seas_ref_id) {
165  return $seas_ref_id;
166  }
167  $query = "SELECT object_reference.ref_id as ref_id FROM object_reference,tree,object_data " .
168  "WHERE tree.parent = " . $ilDB->quote(SYSTEM_FOLDER_ID, 'integer') . " " .
169  "AND object_data.type = 'seas' " .
170  "AND object_reference.ref_id = tree.child " .
171  "AND object_reference.obj_id = object_data.obj_id";
172 
173  $res = $ilDB->query($query);
174  $row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
175 
176  return $seas_ref_id = (int) $row->ref_id;
177  }
$res
Definition: ltiservices.php:66
const SYSTEM_FOLDER_ID
Definition: constants.php:35
global $DIC
Definition: shib_login.php:26
+ 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 358 of file class.ilSearchSettings.php.

Referenced by __read().

358  : void
359  {
360  $this->date_filter = $a_filter;
361  }
+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

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

References $lucene.

Referenced by update().

179  : bool
180  {
181  return $this->lucene;
182  }
+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene ( bool  $a_status)

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

Referenced by __read().

183  : void
184  {
185  $this->lucene = $a_status;
186  }
+ Here is the caller graph for this function:

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter ( bool  $a_status)

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

Referenced by __read().

253  : void
254  {
255  $this->lucene_item_filter_enabled = $a_status;
256  }
+ Here is the caller graph for this function:

◆ enableLuceneMimeFilter()

ilSearchSettings::enableLuceneMimeFilter ( bool  $a_stat)

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

Referenced by __read().

302  : void
303  {
304  $this->lucene_mime_filter_enabled = $a_stat;
305  }
+ Here is the caller graph for this function:

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter ( bool  $a_stat)

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

Referenced by __read().

274  : void
275  {
276  $this->lucene_offline_filter = $a_stat;
277  }
+ Here is the caller graph for this function:

◆ enableLuceneUserSearch()

ilSearchSettings::enableLuceneUserSearch ( bool  $a_status)

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

Referenced by __read().

321  : void
322  {
323  $this->user_search = $a_status;
324  }
+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery ( bool  $a_stat)

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

Referenced by __read().

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

◆ getAutoCompleteLength()

ilSearchSettings::getAutoCompleteLength ( )

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

References $auto_complete_length.

Referenced by update().

222  : int
223  {
225  }
+ Here is the caller graph for this function:

◆ getDefaultOperator()

ilSearchSettings::getDefaultOperator ( )

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

References $default_operator.

Referenced by update().

197  : int
198  {
200  }
+ 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 111 of file class.ilSearchSettings.php.

References getLuceneItemFilter(), and isLuceneItemFilterEnabled().

111  : array
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  }
+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

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

References getLuceneMimeFilter(), and isLuceneItemFilterEnabled().

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

◆ getFragmentCount()

ilSearchSettings::getFragmentCount ( )

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

References $fragmentCount.

Referenced by update().

231  : int
232  {
233  return $this->fragmentCount;
234  }
+ Here is the caller graph for this function:

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

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

References $fragmentSize.

Referenced by update().

212  : int
213  {
214  return $this->fragmentSize;
215  }
+ Here is the caller graph for this function:

◆ getInstance()

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

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

References IL_CAL_DATETIME.

Referenced by update().

246  : ilDateTime
247  {
248  return $this->last_index_date instanceof ilDateTime ?
249  $this->last_index_date :
250  new ilDateTime('2009-01-01 12:00:00', IL_CAL_DATETIME);
251  }
const IL_CAL_DATETIME
+ Here is the caller graph for this function:

◆ getLuceneItemFilter()

ilSearchSettings::getLuceneItemFilter ( )

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

References $lucene_item_filter.

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

263  : array
264  {
266  }
+ 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 78 of file class.ilSearchSettings.php.

Referenced by ilObjSearchSettingsFormGUI\initForm().

78  : array
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','trans' => 'obj_lrss'),
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  'copa' => array('filter' => 'type:copa','trans' => 'objs_copa'),
93  );
94  }
+ Here is the caller graph for this function:

◆ getLuceneMimeFilter()

ilSearchSettings::getLuceneMimeFilter ( )

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

References $lucene_mime_filter.

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

289  : array
290  {
292  }
+ Here is the caller graph for this function:

◆ getLuceneMimeFilterDefinitions()

static ilSearchSettings::getLuceneMimeFilterDefinitions ( )
static

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

Referenced by ilObjSearchLuceneSettingsFormGUI\initForm().

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

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

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

References $max_hits.

Referenced by update().

188  : int
189  {
190  return $this->max_hits;
191  }
+ Here is the caller graph for this function:

◆ getMaxSubitems()

ilSearchSettings::getMaxSubitems ( )

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

References $numSubitems.

Referenced by update().

241  : int
242  {
243  return $this->numSubitems;
244  }
+ Here is the caller graph for this function:

◆ isDateFilterEnabled()

ilSearchSettings::isDateFilterEnabled ( )

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

References $date_filter.

Referenced by update().

353  : bool
354  {
355  return $this->date_filter;
356  }
+ Here is the caller graph for this function:

◆ isInactiveUserVisible()

ilSearchSettings::isInactiveUserVisible ( )

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

References $show_inactiv_user.

Referenced by update().

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

◆ isLimitedUserVisible()

ilSearchSettings::isLimitedUserVisible ( )

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

References $show_limited_user.

Referenced by update().

348  : bool
349  {
351  }
+ Here is the caller graph for this function:

◆ isLuceneItemFilterEnabled()

ilSearchSettings::isLuceneItemFilterEnabled ( )

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

References $lucene_item_filter_enabled.

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

258  : bool
259  {
261  }
+ Here is the caller graph for this function:

◆ isLuceneMimeFilterEnabled()

ilSearchSettings::isLuceneMimeFilterEnabled ( )

Check if lucene mime filter is enabled.

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

References $lucene_mime_filter_enabled.

Referenced by update().

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

◆ isLuceneOfflineFilterEnabled()

ilSearchSettings::isLuceneOfflineFilterEnabled ( )

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

References $lucene_offline_filter.

Referenced by update().

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

◆ isLuceneUserSearchEnabled()

ilSearchSettings::isLuceneUserSearchEnabled ( )

Check if user search is enabled.

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

References $user_search.

Referenced by update().

316  : bool
317  {
318  return $this->user_search;
319  }
+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

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

References $prefix_wildcard.

Referenced by update().

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

◆ setAutoCompleteLength()

ilSearchSettings::setAutoCompleteLength ( int  $auto_complete_length)

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

References $auto_complete_length.

Referenced by __read().

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

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator ( int  $a_op)

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

Referenced by __read().

202  : void
203  {
204  $this->default_operator = $a_op;
205  }
+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount ( int  $a_count)

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

Referenced by __read().

217  : void
218  {
219  $this->fragmentCount = $a_count;
220  }
+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize ( int  $a_size)

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

Referenced by __read().

207  : void
208  {
209  $this->fragmentSize = $a_size;
210  }
+ Here is the caller graph for this function:

◆ setLastIndexTime()

ilSearchSettings::setLastIndexTime ( ?ilDateTime  $time)

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

Referenced by __read().

308  : void
309  {
310  $this->last_index_date = $time;
311  }
+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter ( array  $a_filter)

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

Referenced by __read().

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

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter ( array  $a_filter)

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

Referenced by __read().

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

◆ setMaxHits()

ilSearchSettings::setMaxHits ( int  $a_max_hits)

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

Referenced by __read().

192  : void
193  {
194  $this->max_hits = $a_max_hits;
195  }
+ Here is the caller graph for this function:

◆ setMaxSubitems()

ilSearchSettings::setMaxSubitems ( int  $a_max)

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

Referenced by __read().

236  : void
237  {
238  $this->numSubitems = $a_max;
239  }
+ Here is the caller graph for this function:

◆ showInactiveUser()

ilSearchSettings::showInactiveUser ( bool  $a_visible)

show inactive user in user search

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

Referenced by __read().

329  : void
330  {
331  $this->show_inactiv_user = $a_visible;
332  }
+ 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 342 of file class.ilSearchSettings.php.

Referenced by __read().

342  : void
343  {
344  $this->show_limited_user = $a_visible;
345  }
+ Here is the caller graph for this function:

◆ update()

ilSearchSettings::update ( )

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

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

363  : void
364  {
365  $this->setting->set('search_max_hits', (string) $this->getMaxHits());
366  $this->setting->set('search_lucene', (string) $this->enabledLucene());
367 
368  $this->setting->set('lucene_default_operator', (string) $this->getDefaultOperator());
369  $this->setting->set('lucene_fragment_size', (string) $this->getFragmentSize());
370  $this->setting->set('lucene_fragment_count', (string) $this->getFragmentCount());
371  $this->setting->set('lucene_max_subitems', (string) $this->getMaxSubitems());
372  $this->setting->set('lucene_last_index_time', (string) $this->getLastIndexTime()->get(IL_CAL_UNIX));
373  $this->setting->set('auto_complete_length', (string) $this->getAutoCompleteLength());
374  $this->setting->set('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled());
375  $this->setting->set('lucene_item_filter', serialize($this->getLuceneItemFilter()));
376  $this->setting->set('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled());
377  $this->setting->set('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
378  $this->setting->set('lucene_mime_filter_enabled', (string) $this->isLuceneMimeFilterEnabled());
379  $this->setting->set('lucene_prefix_wildcard', (string) $this->isPrefixWildcardQueryEnabled());
380  $this->setting->set('lucene_user_search', (string) $this->isLuceneUserSearchEnabled());
381  $this->setting->set('search_show_inactiv_user', (string) $this->isInactiveUserVisible());
382  $this->setting->set('search_show_limited_user', (string) $this->isLimitedUserVisible());
383  $this->setting->set('search_date_filter', (string) $this->isDateFilterEnabled());
384  }
isLuceneMimeFilterEnabled()
Check if lucene mime filter is enabled.
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 42 of file class.ilSearchSettings.php.

Referenced by getAutoCompleteLength(), and setAutoCompleteLength().

◆ $date_filter

bool ilSearchSettings::$date_filter = false
protected

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

Referenced by isDateFilterEnabled().

◆ $default_operator

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

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

Referenced by getDefaultOperator().

◆ $fragmentCount

int ilSearchSettings::$fragmentCount = 3
protected

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

Referenced by getFragmentCount().

◆ $fragmentSize

int ilSearchSettings::$fragmentSize = 30
protected

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

Referenced by getFragmentSize().

◆ $ilias

ILIAS ilSearchSettings::$ilias = null
protected

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

◆ $instance

ilSearchSettings ilSearchSettings::$instance = null
staticprotected

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

◆ $last_index_date

ilDateTime ilSearchSettings::$last_index_date = null
protected

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

◆ $lucene

bool ilSearchSettings::$lucene = false
protected

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

Referenced by enabledLucene().

◆ $lucene_item_filter

array ilSearchSettings::$lucene_item_filter = array()
protected

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

Referenced by getLuceneItemFilter().

◆ $lucene_item_filter_enabled

bool ilSearchSettings::$lucene_item_filter_enabled = false
protected

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

Referenced by isLuceneItemFilterEnabled().

◆ $lucene_mime_filter

array ilSearchSettings::$lucene_mime_filter = array()
protected

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

Referenced by getLuceneMimeFilter().

◆ $lucene_mime_filter_enabled

bool ilSearchSettings::$lucene_mime_filter_enabled = false
protected

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

Referenced by isLuceneMimeFilterEnabled().

◆ $lucene_offline_filter

bool ilSearchSettings::$lucene_offline_filter = true
protected

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

Referenced by isLuceneOfflineFilterEnabled().

◆ $max_hits

int ilSearchSettings::$max_hits = 10
private

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

Referenced by getMaxHits().

◆ $numSubitems

int ilSearchSettings::$numSubitems = 5
protected

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

Referenced by getMaxSubitems().

◆ $prefix_wildcard

bool ilSearchSettings::$prefix_wildcard = false
protected

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

Referenced by isPrefixWildcardQueryEnabled().

◆ $setting

ilSetting ilSearchSettings::$setting
protected

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

◆ $show_inactiv_user

bool ilSearchSettings::$show_inactiv_user = true
protected

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

Referenced by isInactiveUserVisible().

◆ $show_limited_user

bool ilSearchSettings::$show_limited_user = true
protected

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

Referenced by isLimitedUserVisible().

◆ $user_search

bool ilSearchSettings::$user_search = false
protected

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

Referenced by isLuceneUserSearchEnabled().

◆ LIKE_SEARCH

const int ilSearchSettings::LIKE_SEARCH = 0

◆ LUCENE_SEARCH

const int ilSearchSettings::LUCENE_SEARCH = 2

◆ OPERATOR_AND

◆ OPERATOR_OR

const int ilSearchSettings::OPERATOR_OR = 2

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

Referenced by ilObjSearchSettingsFormGUI\initForm().


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