ILIAS  release_7 Revision v7.30-3-g800a261c036
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.

52 {
53 global $DIC;
54
55 $ilias = $DIC['ilias'];
56
57 $this->ilias = $ilias;
58 $this->__read();
59 }
global $DIC
Definition: goto.php:24
redirection script todo: (a better solution should control the processing via a xml file)

References $DIC, $ilias, and __read().

+ Here is the call graph for this function:

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )

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

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

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

Referenced by __construct().

+ 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 @access public

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

165 {
166 global $DIC;
167
168 $ilDB = $DIC['ilDB'];
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 = $row->ref_id;
185 }
const SYSTEM_FOLDER_ID
Definition: constants.php:33
$query
foreach($_POST as $key=> $value) $res
global $ilDB

References $DIC, $ilDB, $query, $res, ilDBConstants\FETCHMODE_OBJECT, and SYSTEM_FOLDER_ID.

Referenced by ilSearchController\executeCommand(), ILIAS\Search\Provider\SearchMetaBarProvider\getMetaBarItems(), and ilMainMenuGUI\setTemplateVars().

+ Here is the caller graph for this function:

◆ enableDateFilter()

ilSearchSettings::enableDateFilter (   $a_filter)

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

429 {
430 $this->date_filter = $a_filter;
431 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enabledIndex()

ilSearchSettings::enabledIndex ( )

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

188 {
189 return $this->index ? true : false;
190 }
return true
Flag indicating whether or not HTTP headers will be sent when outputting captcha image/audio.

References true.

Referenced by update().

+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

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

196 {
197 return $this->lucene ? true : false;
198 }

References true.

Referenced by update().

+ Here is the caller graph for this function:

◆ enableIndex()

ilSearchSettings::enableIndex (   $a_status)

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

192 {
193 $this->index = $a_status;
194 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene (   $a_status)

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

200 {
201 $this->lucene = $a_status ? true : false;
202 }

References true.

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter (   $a_status)

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

288 {
289 $this->lucene_item_filter_enabled = $a_status;
290 }

Referenced by __read().

+ 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.

352 {
353 $this->lucene_mime_filter_enabled = $a_stat;
354 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter (   $a_stat)

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

309 {
310 $this->lucene_offline_filter = $a_stat;
311 }

Referenced by __read().

+ 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.

379 {
380 $this->user_search = $a_status;
381 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery (   $a_stat)

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

148 {
149 $this->prefix_wildcard = $a_stat;
150 }

Referenced by __read().

+ 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().

+ 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().

+ 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 114 of file class.ilSearchSettings.php.

115 {
116 if (!$this->isLuceneItemFilterEnabled()) {
117 return array();
118 }
119
120 $filter = $this->getLuceneItemFilter();
121 $enabled = array();
122 foreach (self::getLuceneItemFilterDefinitions() as $obj => $def) {
123 if (isset($filter[$obj]) and $filter[$obj]) {
124 $enabled[$obj] = $def;
125 }
126 }
127 return $enabled;
128 }

References getLuceneItemFilter(), and isLuceneItemFilterEnabled().

+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

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

132 {
133 if (!$this->isLuceneItemFilterEnabled()) {
134 return array();
135 }
136
137 $filter = $this->getLuceneMimeFilter();
138 $enabled = array();
139 foreach (self::getLuceneMimeFilterDefinitions() as $mime => $def) {
140 if (isset($filter[$mime]) and $filter[$mime]) {
141 $enabled[$mime] = $def;
142 }
143 }
144 return $enabled;
145 }

References getLuceneMimeFilter(), and isLuceneItemFilterEnabled().

+ 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().

+ Here is the caller graph for this function:

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

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

229 {
230 return $this->fragmentSize;
231 }

References $fragmentSize.

Referenced by update().

+ Here is the caller graph for this function:

◆ getHideAdvancedSearch()

ilSearchSettings::getHideAdvancedSearch ( )

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

239 {
240 return $this->hide_adv_search ? true : false;
241 }

References true.

Referenced by update().

+ Here is the caller graph for this function:

◆ getInstance()

static ilSearchSettings::getInstance ( )
static
Returns
ilSearchSettings

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

68 {
69 if (self::$instance == null) {
70 return self::$instance = new ilSearchSettings();
71 }
72 return self::$instance;
73 }

References $instance.

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

+ Here is the caller graph for this function:

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

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

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

References IL_CAL_DATETIME.

Referenced by update().

+ 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().

+ 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 80 of file class.ilSearchSettings.php.

81 {
82 return array(
83 'crs' => array('filter' => 'type:crs','trans' => 'objs_crs'),
84 'grp' => array('filter' => 'type:grp', 'trans' => 'objs_grp'),
85 'lms' => array('filter' => 'type:lm OR type:htlm','trans' => 'obj_lrss'),
86 'glo' => array('filter' => 'type:glo','trans' => 'objs_glo'),
87 'mep' => array('filter' => 'type:mep', 'trans' => 'objs_mep'),
88 'tst' => array('filter' => 'type:tst OR type:svy OR type:qpl OR type:spl','trans' => 'search_tst_svy'),
89 'frm' => array('filter' => 'type:frm','trans' => 'objs_frm'),
90 'exc' => array('filter' => 'type:exc','trans' => 'objs_exc'),
91 'file' => array('filter' => 'type:file','trans' => 'objs_file'),
92 'mcst' => array('filter' => 'type:mcst','trans' => 'objs_mcst'),
93 'wiki' => array('filter' => 'type:wiki','trans' => 'objs_wiki'),
94 'copa' => array('filter' => 'type:copa','trans' => 'objs_copa'),
95 );
96 }

Referenced by ilObjSearchSettingsGUI\initFormSettings().

+ 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().

+ Here is the caller graph for this function:

◆ getLuceneMimeFilterDefinitions()

static ilSearchSettings::getLuceneMimeFilterDefinitions ( )
static

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

99 {
100 return array(
101 'pdf' => array('filter' => 'mimeType:pdf','trans' => 'search_mime_pdf'),
102 'word' => array('filter' => 'mimeType:word','trans' => 'search_mime_word'),
103 'excel' => array('filter' => 'mimeType:excel','trans' => 'search_mime_excel'),
104 'powerpoint' => array('filter' => 'mimeType:powerpoint','trans' => 'search_mime_powerpoint'),
105 'image' => array('filter' => 'mimeType:image','trans' => 'search_mime_image')
106 );
107 }

Referenced by ilObjSearchSettingsGUI\initFormLuceneSettings().

+ Here is the caller graph for this function:

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

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

205 {
206 return $this->max_hits;
207 }

References $max_hits.

Referenced by update().

+ Here is the caller graph for this function:

◆ getMaxSubitems()

ilSearchSettings::getMaxSubitems ( )

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

266 {
267 return $this->numSubitems;
268 }

References $numSubitems.

Referenced by update().

+ Here is the caller graph for this function:

◆ isDateFilterEnabled()

ilSearchSettings::isDateFilterEnabled ( )

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

424 {
425 return $this->date_filter;
426 }

References $date_filter.

Referenced by update().

+ 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().

+ 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().

+ 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().

+ 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().

+ 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 update().

+ 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.

370 {
371 return $this->user_search;
372 }

References $user_search.

Referenced by update().

+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

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

References $prefix_wildcard.

Referenced by update().

+ 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().

+ 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().

+ Here is the caller graph for this function:

◆ setAutoCompleteLength()

ilSearchSettings::setAutoCompleteLength (   $auto_complete_length)

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

251 {
252 $this->auto_complete_length = $auto_complete_length;
253 }

References $auto_complete_length.

Referenced by __read().

+ Here is the caller graph for this function:

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator (   $a_op)

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

219 {
220 $this->default_operator = $a_op;
221 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount (   $a_count)

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

234 {
235 $this->fragmentCount = $a_count;
236 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize (   $a_size)

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

224 {
225 $this->fragmentSize = $a_size;
226 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setHideAdvancedSearch()

ilSearchSettings::setHideAdvancedSearch (   $a_status)

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

243 {
244 $this->hide_adv_search = $a_status;
245 }

Referenced by __read().

+ 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.

361 {
362 $this->last_index_date = $time;
363 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter (   $a_filter)

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

304 {
305 $this->lucene_item_filter = $a_filter;
306 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter (   $a_filter)

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

330 {
331 $this->lucene_mime_filter = $a_filter;
332 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setMaxHits()

ilSearchSettings::setMaxHits (   $a_max_hits)

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

209 {
210 $this->max_hits = $a_max_hits;
211 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setMaxSubitems()

ilSearchSettings::setMaxSubitems (   $a_max)

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

261 {
262 $this->numSubitems = $a_max;
263 }

Referenced by __read().

+ 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.

389 {
390 $this->show_inactiv_user = (bool) $a_visible;
391 }

Referenced by __read().

+ 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.

409 {
410 $this->show_limited_user = (bool) $a_visible;
411 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ showRelevance()

ilSearchSettings::showRelevance (   $a_status)

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

276 {
277 $this->showRelevance = (bool) $a_status;
278 }

References showRelevance().

Referenced by __read(), and showRelevance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showSubRelevance()

ilSearchSettings::showSubRelevance (   $a_stat)

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

319 {
320 $this->showSubRelevance = $a_stat;
321 }

References showSubRelevance().

Referenced by __read(), and showSubRelevance().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ update()

ilSearchSettings::update ( )

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

434 {
435 global $DIC;
436
437 $ilSetting = $DIC['ilSetting'];
438
439 $this->ilias->setSetting('search_max_hits', $this->getMaxHits());
440 $this->ilias->setSetting('search_index', (int) $this->enabledIndex());
441 $this->ilias->setSetting('search_lucene', (int) $this->enabledLucene());
442
443 $this->ilias->setSetting('lucene_default_operator', $this->getDefaultOperator());
444 $this->ilias->setSetting('lucene_fragment_size', $this->getFragmentSize());
445 $this->ilias->setSetting('lucene_fragment_count', $this->getFragmentCount());
446 $this->ilias->setSetting('lucene_max_subitems', $this->getMaxSubitems());
447 $this->ilias->setSetting('lucene_show_relevance', $this->isRelevanceVisible());
448 $this->ilias->setSetting('lucene_last_index_time', $this->getLastIndexTime()->get(IL_CAL_UNIX));
449 $this->ilias->setSetting('hide_adv_search', (int) $this->getHideAdvancedSearch());
450 $this->ilias->setSetting('auto_complete_length', (int) $this->getAutoCompleteLength());
451 $this->ilias->setSetting('lucene_item_filter_enabled', (int) $this->isLuceneItemFilterEnabled());
452 $this->ilias->setSetting('lucene_item_filter', serialize($this->getLuceneItemFilter()));
453 $this->ilias->setSetting('lucene_offline_filter', (int) $this->isLuceneOfflineFilterEnabled());
454 $this->ilias->setSetting('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
455 $this->ilias->setSetting('lucene_sub_relevance', $this->isSubRelevanceVisible());
456 $ilSetting->set('lucene_mime_filter_enabled', $this->isLuceneMimeFilterEnabled());
457 $this->ilias->setSetting('lucene_prefix_wildcard', $this->isPrefixWildcardQueryEnabled());
458 $ilSetting->set('lucene_user_search', $this->isLuceneUserSearchEnabled());
459 $ilSetting->set('search_show_inactiv_user', $this->isInactiveUserVisible());
460 $ilSetting->set('search_show_limited_user', $this->isLimitedUserVisible());
461
462 $ilSetting->set('search_date_filter', $this->isDateFilterEnabled());
463
464 return true;
465 }
isLuceneMimeFilterEnabled()
Check if lucene mime filter is enabled.
isLimitedUserVisible()
are user with limited access visible in user search
isInactiveUserVisible()
are inactive user visible in user search
isLuceneUserSearchEnabled()
Check if user search is enabled.

References $DIC, $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().

+ 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.

Referenced by getInstance().

◆ $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: