ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
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 ()
 
 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
 
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 56 of file class.ilSearchSettings.php.

57 {
58 global $DIC;
59
60 $this->ilias = $DIC['ilias'];
61 $this->setting = $DIC->settings();
62 $this->__read();
63 }
Class ilObjForumAdministration.
global $DIC
Definition: shib_login.php:26

References $DIC, and __read().

+ Here is the call graph for this function:

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )
protected

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

375 {
376 $this->setMaxHits((int) $this->setting->get('search_max_hits', '10'));
377 $this->enableLucene((bool) $this->setting->get('search_lucene', '0'));
378 $this->setDefaultOperator((int) $this->setting->get('lucene_default_operator', (string) self::OPERATOR_AND));
379 $this->setFragmentSize((int) $this->setting->get('lucene_fragment_size', "50"));
380 $this->setFragmentCount((int) $this->setting->get('lucene_fragment_count', "3"));
381 if ($time = $this->setting->get('lucene_last_index_time', '0')) {
382 $this->setLastIndexTime(new ilDateTime($time, IL_CAL_UNIX));
383 } else {
384 $this->setLastIndexTime(null);
385 }
386 $this->setAutoCompleteLength((int) $this->setting->get('auto_complete_length', (string) $this->getAutoCompleteLength()));
387 $this->enableLuceneItemFilter((bool) $this->setting->get('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled()));
388 $filter = (string) $this->setting->get('lucene_item_filter', serialize($this->getLuceneItemFilter()));
389 $this->setLuceneItemFilter(unserialize($filter));
390 $this->enableLuceneOfflineFilter((bool) $this->setting->get('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled()));
391 $this->enableLuceneMimeFilter((bool) $this->setting->get('lucene_mime_filter_enabled', (string) $this->lucene_item_filter_enabled));
392 $filter = (string) $this->setting->get('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
393 $this->setLuceneMimeFilter(unserialize($filter));
394 $this->enablePrefixWildcardQuery((bool) $this->setting->get('lucene_prefix_wildcard', (string) $this->prefix_wildcard));
395 $this->enableLuceneUserSearch((bool) $this->setting->get('lucene_user_search', (string) $this->user_search));
396 $this->showInactiveUser((bool) $this->setting->get('search_show_inactiv_user', (string) $this->show_inactiv_user));
397 $this->showLimitedUser((bool) $this->setting->get('search_show_limited_user', (string) $this->show_limited_user));
398 $this->enableDateFilter((bool) $this->setting->get('search_date_filter', (string) $this->date_filter));
399 }
const IL_CAL_UNIX
@classDescription Date and time handling
enablePrefixWildcardQuery(bool $a_stat)
enableLuceneUserSearch(bool $a_status)
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)
setLastIndexTime(?ilDateTime $time)
enableLuceneMimeFilter(bool $a_stat)
enableLuceneItemFilter(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(), setLastIndexTime(), setLuceneItemFilter(), setLuceneMimeFilter(), setMaxHits(), showInactiveUser(), and showLimitedUser().

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

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

References $DIC, $ilDB, $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 347 of file class.ilSearchSettings.php.

347 : void
348 {
349 $this->date_filter = $a_filter;
350 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

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

178 : bool
179 {
180 return $this->lucene;
181 }

References $lucene.

Referenced by update().

+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene ( bool  $a_status)

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

182 : void
183 {
184 $this->lucene = $a_status;
185 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter ( bool  $a_status)

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

242 : void
243 {
244 $this->lucene_item_filter_enabled = $a_status;
245 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneMimeFilter()

ilSearchSettings::enableLuceneMimeFilter ( bool  $a_stat)

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

291 : void
292 {
293 $this->lucene_mime_filter_enabled = $a_stat;
294 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter ( bool  $a_stat)

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

263 : void
264 {
265 $this->lucene_offline_filter = $a_stat;
266 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneUserSearch()

ilSearchSettings::enableLuceneUserSearch ( bool  $a_status)

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

310 : void
311 {
312 $this->user_search = $a_status;
313 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery ( bool  $a_stat)

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

142 : void
143 {
144 $this->prefix_wildcard = $a_stat;
145 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ getAutoCompleteLength()

ilSearchSettings::getAutoCompleteLength ( )

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

221 : int
222 {
224 }

References $auto_complete_length.

Referenced by update().

+ Here is the caller graph for this function:

◆ getDefaultOperator()

ilSearchSettings::getDefaultOperator ( )

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

196 : int
197 {
199 }

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

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

References getLuceneItemFilter(), and isLuceneItemFilterEnabled().

+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

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

126 : array
127 {
128 if (!$this->isLuceneMimeFilterEnabled()) {
129 return array();
130 }
131
132 $filter = $this->getLuceneMimeFilter();
133 $enabled = array();
134 foreach (self::getLuceneMimeFilterDefinitions() as $mime => $def) {
135 if (isset($filter[$mime]) and $filter[$mime]) {
136 $enabled[$mime] = $def;
137 }
138 }
139 return $enabled;
140 }
isLuceneMimeFilterEnabled()
Check if lucene mime filter is enabled.

References getLuceneMimeFilter(), and isLuceneMimeFilterEnabled().

+ Here is the call graph for this function:

◆ getFragmentCount()

ilSearchSettings::getFragmentCount ( )

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

230 : int
231 {
233 }

References $fragmentCount.

Referenced by update().

+ Here is the caller graph for this function:

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

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

211 : int
212 {
213 return $this->fragmentSize;
214 }

References $fragmentSize.

Referenced by update().

+ Here is the caller graph for this function:

◆ getInstance()

static ilSearchSettings::getInstance ( )
static

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

66 {
67 if (self::$instance instanceof ilSearchSettings) {
68 return self::$instance;
69 }
70 return self::$instance = new ilSearchSettings();
71 }
static ilSearchSettings $instance

References $instance.

Referenced by ilSearchGUI\__construct(), ilRepositoryObjectDetailSearch\__construct(), ilLuceneSearchResultFilter\__construct(), ILIAS\Mail\RecipientSearch\LegacyAutocompleteSearchResult\__construct(), ilRepositoryObjectSearchResultTableGUI\__construct(), ilQueryParser\__construct(), ilSearchFilterGUI\__construct(), ILIAS\Search\GUI\Service\Service\directSearcher(), ILIAS\Search\GUI\Service\Service\directSearchStateHandler(), ilMailFolderGUI\getFilteredSearch(), ilMailFolderGUI\getFilterUI(), ilMainMenuSearchGUI\getHTML(), ilSearchAutoComplete\getList(), ilUserAutoComplete\getList(), ilSearchAutoComplete\getLuceneList(), ilMailForm\getRecipientAsync(), ilObjSearchLuceneSettingsFormGUI\getSettings(), ilObjSearchSettingsFormGUI\getSettings(), ilLuceneUserSearchGUI\getTabs(), ilUserAutoComplete\getWherePart(), ILIAS\Search\GUI\Service\Service\luceneSearcher(), ILIAS\Search\GUI\Service\Service\luceneSearchStateHandler(), ilMailLuceneQueryParser\parse(), ilRepositoryUserResultTableGUI\parseUserIds(), ILIAS\Search\GUI\Lucene\SearcherImpl\performSearchAndRenderResults(), ilSoapObjectAdministration\searchObjects(), and ilLuceneIndexer\updateLuceneIndex().

+ Here is the caller graph for this function:

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

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

235 : ilDateTime
236 {
237 return $this->last_index_date instanceof ilDateTime ?
238 $this->last_index_date :
239 new ilDateTime('2009-01-01 12:00:00', IL_CAL_DATETIME);
240 }
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 252 of file class.ilSearchSettings.php.

252 : array
253 {
255 }

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

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

Referenced by ilObjSearchSettingsFormGUI\initForm().

+ Here is the caller graph for this function:

◆ getLuceneMimeFilter()

ilSearchSettings::getLuceneMimeFilter ( )

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

278 : array
279 {
281 }

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

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

Referenced by ilObjSearchLuceneSettingsFormGUI\initForm().

+ Here is the caller graph for this function:

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

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

187 : int
188 {
189 return $this->max_hits;
190 }

References $max_hits.

Referenced by update().

+ Here is the caller graph for this function:

◆ isDateFilterEnabled()

ilSearchSettings::isDateFilterEnabled ( )

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

342 : bool
343 {
344 return $this->date_filter;
345 }

References $date_filter.

Referenced by update().

+ Here is the caller graph for this function:

◆ isInactiveUserVisible()

ilSearchSettings::isInactiveUserVisible ( )

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

323 : bool
324 {
326 }

References $show_inactiv_user.

Referenced by update().

+ Here is the caller graph for this function:

◆ isLimitedUserVisible()

ilSearchSettings::isLimitedUserVisible ( )

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

337 : bool
338 {
340 }

References $show_limited_user.

Referenced by update().

+ Here is the caller graph for this function:

◆ isLuceneItemFilterEnabled()

ilSearchSettings::isLuceneItemFilterEnabled ( )

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

247 : bool
248 {
250 }

References $lucene_item_filter_enabled.

Referenced by getEnabledLuceneItemFilterDefinitions(), and update().

+ Here is the caller graph for this function:

◆ isLuceneMimeFilterEnabled()

ilSearchSettings::isLuceneMimeFilterEnabled ( )

Check if lucene mime filter is enabled.

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

286 : bool
287 {
289 }

References $lucene_mime_filter_enabled.

Referenced by getEnabledLuceneMimeFilterDefinitions(), and update().

+ Here is the caller graph for this function:

◆ isLuceneOfflineFilterEnabled()

ilSearchSettings::isLuceneOfflineFilterEnabled ( )

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

268 : bool
269 {
271 }

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

305 : bool
306 {
307 return $this->user_search;
308 }

References $user_search.

Referenced by update().

+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

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

147 : bool
148 {
150 }

References $prefix_wildcard.

Referenced by update().

+ Here is the caller graph for this function:

◆ setAutoCompleteLength()

ilSearchSettings::setAutoCompleteLength ( int  $auto_complete_length)

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

225 : void
226 {
227 $this->auto_complete_length = $auto_complete_length;
228 }

References $auto_complete_length.

Referenced by __read().

+ Here is the caller graph for this function:

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator ( int  $a_op)

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

201 : void
202 {
203 $this->default_operator = $a_op;
204 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount ( int  $a_count)

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

216 : void
217 {
218 $this->fragmentCount = $a_count;
219 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize ( int  $a_size)

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

206 : void
207 {
208 $this->fragmentSize = $a_size;
209 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLastIndexTime()

ilSearchSettings::setLastIndexTime ( ?ilDateTime  $time)

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

297 : void
298 {
299 $this->last_index_date = $time;
300 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter ( array  $a_filter)

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

258 : void
259 {
260 $this->lucene_item_filter = $a_filter;
261 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter ( array  $a_filter)

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

273 : void
274 {
275 $this->lucene_mime_filter = $a_filter;
276 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setMaxHits()

ilSearchSettings::setMaxHits ( int  $a_max_hits)

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

191 : void
192 {
193 $this->max_hits = $a_max_hits;
194 }

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

318 : void
319 {
320 $this->show_inactiv_user = $a_visible;
321 }

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

331 : void
332 {
333 $this->show_limited_user = $a_visible;
334 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ update()

ilSearchSettings::update ( )

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

352 : void
353 {
354 $this->setting->set('search_max_hits', (string) $this->getMaxHits());
355 $this->setting->set('search_lucene', (string) $this->enabledLucene());
356
357 $this->setting->set('lucene_default_operator', (string) $this->getDefaultOperator());
358 $this->setting->set('lucene_fragment_size', (string) $this->getFragmentSize());
359 $this->setting->set('lucene_fragment_count', (string) $this->getFragmentCount());
360 $this->setting->set('lucene_last_index_time', (string) $this->getLastIndexTime()->get(IL_CAL_UNIX));
361 $this->setting->set('auto_complete_length', (string) $this->getAutoCompleteLength());
362 $this->setting->set('lucene_item_filter_enabled', (string) $this->isLuceneItemFilterEnabled());
363 $this->setting->set('lucene_item_filter', serialize($this->getLuceneItemFilter()));
364 $this->setting->set('lucene_offline_filter', (string) $this->isLuceneOfflineFilterEnabled());
365 $this->setting->set('lucene_mime_filter', serialize($this->getLuceneMimeFilter()));
366 $this->setting->set('lucene_mime_filter_enabled', (string) $this->isLuceneMimeFilterEnabled());
367 $this->setting->set('lucene_prefix_wildcard', (string) $this->isPrefixWildcardQueryEnabled());
368 $this->setting->set('lucene_user_search', (string) $this->isLuceneUserSearchEnabled());
369 $this->setting->set('search_show_inactiv_user', (string) $this->isInactiveUserVisible());
370 $this->setting->set('search_show_limited_user', (string) $this->isLimitedUserVisible());
371 $this->setting->set('search_date_filter', (string) $this->isDateFilterEnabled());
372 }
isLuceneUserSearchEnabled()
Check if user search is enabled.

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

+ Here is the call graph for this function:

Field Documentation

◆ $auto_complete_length

int ilSearchSettings::$auto_complete_length = 10
protected

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

Referenced by getAutoCompleteLength(), and setAutoCompleteLength().

◆ $date_filter

bool ilSearchSettings::$date_filter = false
protected

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

◆ $instance

ilSearchSettings ilSearchSettings::$instance = null
staticprotected

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

Referenced by getInstance().

◆ $last_index_date

ilDateTime ilSearchSettings::$last_index_date = null
protected

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

◆ $lucene

bool ilSearchSettings::$lucene = false
protected

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

Referenced by enabledLucene().

◆ $lucene_item_filter

array ilSearchSettings::$lucene_item_filter = array()
protected

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

Referenced by getLuceneItemFilter().

◆ $lucene_item_filter_enabled

bool ilSearchSettings::$lucene_item_filter_enabled = false
protected

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

Referenced by isLuceneItemFilterEnabled().

◆ $lucene_mime_filter

array ilSearchSettings::$lucene_mime_filter = array()
protected

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

Referenced by getLuceneMimeFilter().

◆ $lucene_mime_filter_enabled

bool ilSearchSettings::$lucene_mime_filter_enabled = false
protected

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

Referenced by isLuceneMimeFilterEnabled().

◆ $lucene_offline_filter

bool ilSearchSettings::$lucene_offline_filter = true
protected

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

Referenced by isLuceneOfflineFilterEnabled().

◆ $max_hits

int ilSearchSettings::$max_hits = 10
private

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

Referenced by getMaxHits().

◆ $prefix_wildcard

bool ilSearchSettings::$prefix_wildcard = false
protected

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

Referenced by isPrefixWildcardQueryEnabled().

◆ $setting

ilSetting ilSearchSettings::$setting
protected

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

◆ $show_inactiv_user

bool ilSearchSettings::$show_inactiv_user = true
protected

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

Referenced by isInactiveUserVisible().

◆ $show_limited_user

bool ilSearchSettings::$show_limited_user = true
protected

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

Referenced by isLimitedUserVisible().

◆ $user_search

bool ilSearchSettings::$user_search = false
protected

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