ILIAS  release_8 Revision v8.24
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 ()
 
 isRelevanceVisible ()
 
 showRelevance (bool $a_status)
 
 getLastIndexTime ()
 
 enableLuceneItemFilter (bool $a_status)
 
 isLuceneItemFilterEnabled ()
 
 getLuceneItemFilter ()
 
 setLuceneItemFilter (array $a_filter)
 
 enableLuceneOfflineFilter (bool $a_stat)
 
 isLuceneOfflineFilterEnabled ()
 
 showSubRelevance (bool $a_stat)
 
 isSubRelevanceVisible ()
 
 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
 
bool $showRelevance = true
 
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 $showSubRelevance = false
 
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 15 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 $this->ilias = $DIC['ilias'];
56 $this->setting = $DIC->settings();
57 $this->__read();
58 }
global $DIC
Definition: feed.php:28
header include for all ilias files.

References $DIC, and __read().

+ Here is the call graph for this function:

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )
protected

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

423 {
424 $this->setMaxHits((int) $this->setting->get('search_max_hits', '10'));
425 $this->enableLucene((bool) $this->setting->get('search_lucene', '0'));
426 $this->setDefaultOperator((int) $this->setting->get('lucene_default_operator', (string) self::OPERATOR_AND));
427 $this->setFragmentSize((int) $this->setting->get('lucene_fragment_size', "50"));
428 $this->setFragmentCount((int) $this->setting->get('lucene_fragment_count', "3"));
429 $this->setMaxSubitems((int) $this->setting->get('lucene_max_subitems', "5"));
430 $this->showRelevance((bool) $this->setting->get('lucene_show_relevance', "1"));
431 if ($time = $this->setting->get('lucene_last_index_time', '0')) {
432 $this->setLastIndexTime(new ilDateTime($time, IL_CAL_UNIX));
433 } else {
434 $this->setLastIndexTime(null);
435 }
436 $this->setHideAdvancedSearch((bool) $this->setting->get('hide_adv_search', '0'));
437 $this->setAutoCompleteLength((int) $this->setting->get('auto_complete_length', (string) $this->getAutoCompleteLength()));
438 $this->enableLuceneItemFilter((bool) $this->setting->get('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled()));
439 $filter = (string) $this->setting->get('lucene_item_filter', serialize($this->getLuceneItemFilter()));
440 $this->setLuceneItemFilter(unserialize($filter));
441 $this->enableLuceneOfflineFilter((bool) $this->setting->get('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled()));
442 $this->enableLuceneMimeFilter((bool) $this->setting->get('lucene_mime_filter_enabled', (string) $this->lucene_item_filter_enabled));
443 $filter = (string) $this->setting->get('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
444 $this->setLuceneMimeFilter(unserialize($filter));
445 $this->showSubRelevance((bool) $this->setting->get('lucene_sub_relevance', (string) $this->showSubRelevance));
446 $this->enablePrefixWildcardQuery((bool) $this->setting->get('lucene_prefix_wildcard', (string) $this->prefix_wildcard));
447 $this->enableLuceneUserSearch((bool) $this->setting->get('lucene_user_search', (string) $this->user_search));
448 $this->showInactiveUser((bool) $this->setting->get('search_show_inactiv_user', (string) $this->show_inactiv_user));
449 $this->showLimitedUser((bool) $this->setting->get('search_show_limited_user', (string) $this->show_limited_user));
450 $this->enableDateFilter((bool) $this->setting->get('search_date_filter', (string) $this->date_filter));
451 }
const IL_CAL_UNIX
@classDescription Date and time handling
enablePrefixWildcardQuery(bool $a_stat)
showRelevance(bool $a_status)
enableLuceneUserSearch(bool $a_status)
Enable lucene user search.
setAutoCompleteLength(int $auto_complete_length)
setLuceneMimeFilter(array $a_filter)
enableLucene(bool $a_status)
enableDateFilter(bool $a_filter)
setMaxHits(int $a_max_hits)
setLuceneItemFilter(array $a_filter)
showSubRelevance(bool $a_stat)
setLastIndexTime(?ilDateTime $time)
enableLuceneMimeFilter(bool $a_stat)
enableLuceneItemFilter(bool $a_status)
setHideAdvancedSearch(bool $a_status)
setFragmentCount(int $a_count)
showLimitedUser(bool $a_visible)
show user with limited access in user search
enableLuceneOfflineFilter(bool $a_stat)
showInactiveUser(bool $a_visible)
show inactive user in user search

References enableDateFilter(), 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()

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

151 : int
152 {
153 global $DIC;
154
155 $ilDB = $DIC->database();
156
157 static $seas_ref_id = 0;
158
159 if ($seas_ref_id) {
160 return $seas_ref_id;
161 }
162 $query = "SELECT object_reference.ref_id as ref_id FROM object_reference,tree,object_data " .
163 "WHERE tree.parent = " . $ilDB->quote(SYSTEM_FOLDER_ID, 'integer') . " " .
164 "AND object_data.type = 'seas' " .
165 "AND object_reference.ref_id = tree.child " .
166 "AND object_reference.obj_id = object_data.obj_id";
167
168 $res = $ilDB->query($query);
169 $row = $res->fetchRow(ilDBConstants::FETCHMODE_OBJECT);
170
171 return $seas_ref_id = (int) $row->ref_id;
172 }
const SYSTEM_FOLDER_ID
Definition: constants.php:35
$res
Definition: ltiservices.php:69
$query

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

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

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

390 : void
391 {
392 $this->date_filter = $a_filter;
393 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

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

174 : bool
175 {
176 return $this->lucene;
177 }

References $lucene.

Referenced by update().

+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene ( bool  $a_status)

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

178 : void
179 {
180 $this->lucene = $a_status;
181 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter ( bool  $a_status)

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

266 : void
267 {
268 $this->lucene_item_filter_enabled = $a_status;
269 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneMimeFilter()

ilSearchSettings::enableLuceneMimeFilter ( bool  $a_stat)

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

326 : void
327 {
328 $this->lucene_mime_filter_enabled = $a_stat;
329 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter ( bool  $a_stat)

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

287 : void
288 {
289 $this->lucene_offline_filter = $a_stat;
290 }

Referenced by __read().

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

349 : void
350 {
351 $this->user_search = $a_status;
352 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery ( bool  $a_stat)

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

138 : void
139 {
140 $this->prefix_wildcard = $a_stat;
141 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ getAutoCompleteLength()

ilSearchSettings::getAutoCompleteLength ( )

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

225 : int
226 {
228 }

References $auto_complete_length.

Referenced by update().

+ Here is the caller graph for this function:

◆ getDefaultOperator()

ilSearchSettings::getDefaultOperator ( )

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

192 : int
193 {
195 }

References $default_operator.

Referenced by update().

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

105 : array
106 {
107 if (!$this->isLuceneItemFilterEnabled()) {
108 return array();
109 }
110
111 $filter = $this->getLuceneItemFilter();
112 $enabled = array();
113 foreach (self::getLuceneItemFilterDefinitions() as $obj => $def) {
114 if (isset($filter[$obj]) and $filter[$obj]) {
115 $enabled[$obj] = $def;
116 }
117 }
118 return $enabled;
119 }
bool $enabled
Whether the system instance is enabled to accept connection requests.
Definition: System.php:123

References ILIAS\LTI\ToolProvider\$enabled, getLuceneItemFilter(), and isLuceneItemFilterEnabled().

+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

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

122 : array
123 {
124 if (!$this->isLuceneItemFilterEnabled()) {
125 return array();
126 }
127
128 $filter = $this->getLuceneMimeFilter();
129 $enabled = array();
130 foreach (self::getLuceneMimeFilterDefinitions() as $mime => $def) {
131 if (isset($filter[$mime]) and $filter[$mime]) {
132 $enabled[$mime] = $def;
133 }
134 }
135 return $enabled;
136 }

References ILIAS\LTI\ToolProvider\$enabled, getLuceneMimeFilter(), and isLuceneItemFilterEnabled().

+ Here is the call graph for this function:

◆ getFragmentCount()

ilSearchSettings::getFragmentCount ( )

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

234 : int
235 {
237 }

References $fragmentCount.

Referenced by update().

+ Here is the caller graph for this function:

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

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

207 : int
208 {
209 return $this->fragmentSize;
210 }

References $fragmentSize.

Referenced by update().

+ Here is the caller graph for this function:

◆ getHideAdvancedSearch()

ilSearchSettings::getHideAdvancedSearch ( )

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

217 : bool
218 {
220 }

References $hide_adv_search.

Referenced by update().

+ Here is the caller graph for this function:

◆ getInstance()

static ilSearchSettings::getInstance ( )
static

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

61 {
62 if (self::$instance instanceof ilSearchSettings) {
63 return self::$instance;
64 }
65 return self::$instance = new ilSearchSettings();
66 }
static ilSearchSettings $instance

References $instance.

Referenced by ilSearchGUI\__construct(), ilRepositoryObjectDetailSearch\__construct(), ilLuceneSearchResultFilter\__construct(), ilMailAutoCompleteRecipientResult\__construct(), ilRepositoryObjectSearchResultTableGUI\__construct(), ilQueryParser\__construct(), ilSubItemListGUI\__construct(), ilSearchResultTableGUI\enabledRelevance(), ilLuceneAdvancedSearchFields\getFields(), ilMainMenuSearchGUI\getHTML(), ilSearchControllerGUI\getLastClass(), ilSearchAutoComplete\getList(), ilUserAutoComplete\getList(), ilSearchAutoComplete\getLuceneList(), ilMailForm\getRecipientAsync(), ilSearchBaseGUI\getSearchAreaForm(), ilObjSearchLuceneSettingsFormGUI\getSettings(), ilObjSearchSettingsFormGUI\getSettings(), ilLuceneAdvancedSearchGUI\getTabs(), ilLuceneSearchGUI\getTabs(), ilLuceneUserSearchGUI\getTabs(), ilUserAutoComplete\getWherePart(), ilSearchBaseGUI\initStandardSearchForm(), ilLuceneSearchGUI\initUserSearchCache(), ilMailFolderTableGUI\isLuceneEnabled(), ilSubItemListGUI\parseRelevance(), ilRepositoryUserResultTableGUI\parseUserIds(), ilAdvancedSearchGUI\performSearch(), ilSearchGUI\performSearch(), ilLuceneSearchGUI\performSearch(), ilSoapObjectAdministration\searchObjects(), ilSearchGUI\showSearch(), ilLuceneSearchGUI\showSearchForm(), and ilLuceneIndexer\updateLuceneIndex().

+ Here is the caller graph for this function:

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

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

259 : ilDateTime
260 {
261 return $this->last_index_date instanceof ilDateTime ?
262 $this->last_index_date :
263 new ilDateTime('2009-01-01 12:00:00', IL_CAL_DATETIME);
264 }
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 276 of file class.ilSearchSettings.php.

276 : array
277 {
279 }

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.

Todo:
This has to be defined in module.xml

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

72 : array
73 {
74 return array(
75 'crs' => array('filter' => 'type:crs','trans' => 'objs_crs'),
76 'grp' => array('filter' => 'type:grp', 'trans' => 'objs_grp'),
77 'lms' => array('filter' => 'type:lm OR type:htlm','trans' => 'obj_lrss'),
78 'glo' => array('filter' => 'type:glo','trans' => 'objs_glo'),
79 'mep' => array('filter' => 'type:mep', 'trans' => 'objs_mep'),
80 'tst' => array('filter' => 'type:tst OR type:svy OR type:qpl OR type:spl','trans' => 'search_tst_svy'),
81 'frm' => array('filter' => 'type:frm','trans' => 'objs_frm'),
82 'exc' => array('filter' => 'type:exc','trans' => 'objs_exc'),
83 'file' => array('filter' => 'type:file','trans' => 'objs_file'),
84 'mcst' => array('filter' => 'type:mcst','trans' => 'objs_mcst'),
85 'wiki' => array('filter' => 'type:wiki','trans' => 'objs_wiki'),
86 'copa' => array('filter' => 'type:copa','trans' => 'objs_copa'),
87 );
88 }

Referenced by ilObjSearchSettingsFormGUI\initForm().

+ Here is the caller graph for this function:

◆ getLuceneMimeFilter()

ilSearchSettings::getLuceneMimeFilter ( )

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

313 : array
314 {
316 }

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

90 : array
91 {
92 return array(
93 'pdf' => array('filter' => 'mimeType:pdf','trans' => 'search_mime_pdf'),
94 'word' => array('filter' => 'mimeType:word','trans' => 'search_mime_word'),
95 'excel' => array('filter' => 'mimeType:excel','trans' => 'search_mime_excel'),
96 'powerpoint' => array('filter' => 'mimeType:powerpoint','trans' => 'search_mime_powerpoint'),
97 'image' => array('filter' => 'mimeType:image','trans' => 'search_mime_image')
98 );
99 }

Referenced by ilObjSearchLuceneSettingsFormGUI\initForm().

+ Here is the caller graph for this function:

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

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

183 : int
184 {
185 return $this->max_hits;
186 }

References $max_hits.

Referenced by update().

+ Here is the caller graph for this function:

◆ getMaxSubitems()

ilSearchSettings::getMaxSubitems ( )

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

244 : int
245 {
246 return $this->numSubitems;
247 }

References $numSubitems.

Referenced by update().

+ Here is the caller graph for this function:

◆ isDateFilterEnabled()

ilSearchSettings::isDateFilterEnabled ( )

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

385 : bool
386 {
387 return $this->date_filter;
388 }

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

366 : bool
367 {
369 }

References $show_inactiv_user.

Referenced by update().

+ Here is the caller graph for this function:

◆ isLimitedUserVisible()

ilSearchSettings::isLimitedUserVisible ( )

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

380 : bool
381 {
383 }

References $show_limited_user.

Referenced by update().

+ Here is the caller graph for this function:

◆ isLuceneItemFilterEnabled()

ilSearchSettings::isLuceneItemFilterEnabled ( )

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

271 : bool
272 {
274 }

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

321 : bool
322 {
324 }

References $lucene_mime_filter_enabled.

Referenced by update().

+ Here is the caller graph for this function:

◆ isLuceneOfflineFilterEnabled()

ilSearchSettings::isLuceneOfflineFilterEnabled ( )

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

292 : bool
293 {
295 }

References $lucene_offline_filter.

Referenced by update().

+ Here is the caller graph for this function:

◆ isLuceneUserSearchEnabled()

ilSearchSettings::isLuceneUserSearchEnabled ( )

Check if user search is enabled.

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

340 : bool
341 {
342 return $this->user_search;
343 }

References $user_search.

Referenced by update().

+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

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

143 : bool
144 {
146 }

References $prefix_wildcard.

Referenced by update().

+ Here is the caller graph for this function:

◆ isRelevanceVisible()

ilSearchSettings::isRelevanceVisible ( )

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

249 : bool
250 {
252 }

References $showRelevance.

Referenced by update().

+ Here is the caller graph for this function:

◆ isSubRelevanceVisible()

ilSearchSettings::isSubRelevanceVisible ( )

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

302 : bool
303 {
305 }

References $showSubRelevance.

Referenced by update().

+ Here is the caller graph for this function:

◆ setAutoCompleteLength()

ilSearchSettings::setAutoCompleteLength ( int  $auto_complete_length)

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

229 : void
230 {
231 $this->auto_complete_length = $auto_complete_length;
232 }

References $auto_complete_length.

Referenced by __read().

+ Here is the caller graph for this function:

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator ( int  $a_op)

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

197 : void
198 {
199 $this->default_operator = $a_op;
200 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount ( int  $a_count)

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

212 : void
213 {
214 $this->fragmentCount = $a_count;
215 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize ( int  $a_size)

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

202 : void
203 {
204 $this->fragmentSize = $a_size;
205 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setHideAdvancedSearch()

ilSearchSettings::setHideAdvancedSearch ( bool  $a_status)

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

221 : void
222 {
223 $this->hide_adv_search = $a_status;
224 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLastIndexTime()

ilSearchSettings::setLastIndexTime ( ?ilDateTime  $time)

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

332 : void
333 {
334 $this->last_index_date = $time;
335 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter ( array  $a_filter)

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

282 : void
283 {
284 $this->lucene_item_filter = $a_filter;
285 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter ( array  $a_filter)

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

308 : void
309 {
310 $this->lucene_mime_filter = $a_filter;
311 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setMaxHits()

ilSearchSettings::setMaxHits ( int  $a_max_hits)

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

187 : void
188 {
189 $this->max_hits = $a_max_hits;
190 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setMaxSubitems()

ilSearchSettings::setMaxSubitems ( int  $a_max)

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

239 : void
240 {
241 $this->numSubitems = $a_max;
242 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ showInactiveUser()

ilSearchSettings::showInactiveUser ( bool  $a_visible)

show inactive user in user search

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

357 : void
358 {
359 $this->show_inactiv_user = $a_visible;
360 }

Referenced by __read().

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

374 : void
375 {
376 $this->show_limited_user = $a_visible;
377 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ showRelevance()

ilSearchSettings::showRelevance ( bool  $a_status)

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

254 : void
255 {
256 $this->showRelevance = $a_status;
257 }

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 ( bool  $a_stat)

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

297 : void
298 {
299 $this->showSubRelevance = $a_stat;
300 }

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

395 : void
396 {
397 $this->setting->set('search_max_hits', (string) $this->getMaxHits());
398 $this->setting->set('search_lucene', (string) $this->enabledLucene());
399
400 $this->setting->set('lucene_default_operator', (string) $this->getDefaultOperator());
401 $this->setting->set('lucene_fragment_size', (string) $this->getFragmentSize());
402 $this->setting->set('lucene_fragment_count', (string) $this->getFragmentCount());
403 $this->setting->set('lucene_max_subitems', (string) $this->getMaxSubitems());
404 $this->setting->set('lucene_show_relevance', (string) $this->isRelevanceVisible());
405 $this->setting->set('lucene_last_index_time', (string) $this->getLastIndexTime()->get(IL_CAL_UNIX));
406 $this->setting->set('hide_adv_search', (string) $this->getHideAdvancedSearch());
407 $this->setting->set('auto_complete_length', (string) $this->getAutoCompleteLength());
408 $this->setting->set('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled());
409 $this->setting->set('lucene_item_filter', serialize($this->getLuceneItemFilter()));
410 $this->setting->set('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled());
411 $this->setting->set('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
412 $this->setting->set('lucene_sub_relevance', (string) $this->isSubRelevanceVisible());
413 $this->setting->set('lucene_mime_filter_enabled', (string) $this->isLuceneMimeFilterEnabled());
414 $this->setting->set('lucene_prefix_wildcard', (string) $this->isPrefixWildcardQueryEnabled());
415 $this->setting->set('lucene_user_search', (string) $this->isLuceneUserSearchEnabled());
416 $this->setting->set('search_show_inactiv_user', (string) $this->isInactiveUserVisible());
417 $this->setting->set('search_show_limited_user', (string) $this->isLimitedUserVisible());
418 $this->setting->set('search_date_filter', (string) $this->isDateFilterEnabled());
419 }
isLuceneMimeFilterEnabled()
Check if lucene mime filter is enabled.
isInactiveUserVisible()
are inactive user visible in user search
isLuceneUserSearchEnabled()
Check if user search is enabled.

References 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

int ilSearchSettings::$auto_complete_length = 10
protected

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

Referenced by getAutoCompleteLength(), and setAutoCompleteLength().

◆ $date_filter

bool ilSearchSettings::$date_filter = false
protected

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

Referenced by isDateFilterEnabled().

◆ $default_operator

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

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

Referenced by getDefaultOperator().

◆ $fragmentCount

int ilSearchSettings::$fragmentCount = 3
protected

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

Referenced by getFragmentCount().

◆ $fragmentSize

int ilSearchSettings::$fragmentSize = 30
protected

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

Referenced by getFragmentSize().

◆ $hide_adv_search

bool ilSearchSettings::$hide_adv_search = false
protected

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

Referenced by getHideAdvancedSearch().

◆ $ilias

ILIAS ilSearchSettings::$ilias = null
protected

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

◆ $instance

ilSearchSettings ilSearchSettings::$instance = null
staticprotected

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

Referenced by getInstance().

◆ $last_index_date

ilDateTime ilSearchSettings::$last_index_date = null
protected

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

◆ $lucene

bool ilSearchSettings::$lucene = false
protected

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

Referenced by enabledLucene().

◆ $lucene_item_filter

array ilSearchSettings::$lucene_item_filter = array()
protected

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

Referenced by getLuceneItemFilter().

◆ $lucene_item_filter_enabled

bool ilSearchSettings::$lucene_item_filter_enabled = false
protected

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

Referenced by isLuceneItemFilterEnabled().

◆ $lucene_mime_filter

array ilSearchSettings::$lucene_mime_filter = array()
protected

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

Referenced by getLuceneMimeFilter().

◆ $lucene_mime_filter_enabled

bool ilSearchSettings::$lucene_mime_filter_enabled = false
protected

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

Referenced by isLuceneMimeFilterEnabled().

◆ $lucene_offline_filter

bool ilSearchSettings::$lucene_offline_filter = true
protected

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

Referenced by isLuceneOfflineFilterEnabled().

◆ $max_hits

int ilSearchSettings::$max_hits = 10
private

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

Referenced by getMaxHits().

◆ $numSubitems

int ilSearchSettings::$numSubitems = 5
protected

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

Referenced by getMaxSubitems().

◆ $prefix_wildcard

bool ilSearchSettings::$prefix_wildcard = false
protected

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

Referenced by isPrefixWildcardQueryEnabled().

◆ $setting

ilSetting ilSearchSettings::$setting
protected

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

◆ $show_inactiv_user

bool ilSearchSettings::$show_inactiv_user = true
protected

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

Referenced by isInactiveUserVisible().

◆ $show_limited_user

bool ilSearchSettings::$show_limited_user = true
protected

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

Referenced by isLimitedUserVisible().

◆ $showRelevance

bool ilSearchSettings::$showRelevance = true
protected

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

Referenced by isRelevanceVisible().

◆ $showSubRelevance

bool ilSearchSettings::$showSubRelevance = false
protected

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

Referenced by isSubRelevanceVisible().

◆ $user_search

bool ilSearchSettings::$user_search = false
protected

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

Referenced by ilObjSearchSettingsFormGUI\initForm().


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