ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilSearchSettings Class Reference
+ Collaboration diagram for ilSearchSettings:

Public Member Functions

 ilSearchSettings ()
 
 getEnabledLuceneItemFilterDefinitions ()
 Get lucene item filter definitions. More...
 
 getEnabledLuceneMimeFilterDefinitions ()
 
 enablePrefixWildcardQuery ($a_stat)
 
 isPrefixWildcardQueryEnabled ()
 
 _getSearchSettingRefId ()
 Read the ref_id of Search Settings object. More...
 
 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 ()
 

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.

Member Function Documentation

◆ __read()

ilSearchSettings::__read ( )

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

476 {
477 global $ilSetting;
478
479 $this->setMaxHits($this->ilias->getSetting('search_max_hits',10));
480 $this->enableIndex($this->ilias->getSetting('search_index',0));
481 $this->enableLucene($this->ilias->getSetting('search_lucene',0));
482
483 $this->setDefaultOperator($this->ilias->getSetting('lucene_default_operator',self::OPERATOR_AND));
484 $this->setFragmentSize($this->ilias->getSetting('lucene_fragment_size',50));
485 $this->setFragmentCount($this->ilias->getSetting('lucene_fragment_count',3));
486 $this->setMaxSubitems($this->ilias->getSetting('lucene_max_subitems',5));
487 $this->showRelevance($this->ilias->getSetting('lucene_show_relevance',true));
488
489 if($time = $this->ilias->getSetting('lucene_last_index_time',false))
490 {
491 $this->setLastIndexTime(new ilDateTime($time,IL_CAL_UNIX));
492 }
493 else
494 {
495 $this->setLastIndexTime(null);
496 }
497
498 $this->setHideAdvancedSearch($this->ilias->getSetting('hide_adv_search',0));
499 $this->setAutoCompleteLength($this->ilias->getSetting('auto_complete_length',$this->getAutoCompleteLength()));
500
501 $this->enableLuceneItemFilter($this->ilias->getSetting('lucene_item_filter_enabled',(int) $this->isLuceneItemFilterEnabled()));
502
503 $filter = $this->ilias->getSetting('lucene_item_filter',serialize($this->getLuceneItemFilter()));
504 $this->setLuceneItemFilter(unserialize($filter));
505 $this->enableLuceneOfflineFilter($this->ilias->getSetting('lucene_offline_filter'), $this->isLuceneOfflineFilterEnabled());
506
507 $this->enableLuceneMimeFilter($ilSetting->get('lucene_mime_filter_enabled',$this->lucene_item_filter_enabled));
508 $filter = $this->ilias->getSetting('lucene_mime_filter',serialize($this->getLuceneMimeFilter()));
509 $this->setLuceneMimeFilter(unserialize($filter));
510 $this->showSubRelevance($this->ilias->getSetting('lucene_sub_relevance',$this->showSubRelevance));
511 $this->enablePrefixWildcardQuery($this->ilias->getSetting('lucene_prefix_wildcard',$this->prefix_wildcard));
512 $this->enableLuceneUserSearch($ilSetting->get('lucene_user_search',$this->user_search));
513
514 $this->showInactiveUser($ilSetting->get('search_show_inactiv_user', $this->show_inactiv_user));
515 $this->showLimitedUser($ilSetting->get('search_show_limited_user', $this->show_limited_user));
516
517 $this->enableDateFilter($ilSetting->get('search_date_filter', $this->date_filter));
518 }
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.
redirection script todo: (a better solution should control the processing via a xml file)
global $ilSetting
Definition: privfeed.php:40

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

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

◆ _getSearchSettingRefId()

ilSearchSettings::_getSearchSettingRefId ( )

Read the ref_id of Search Settings object.

normally used for rbacsystem->checkAccess()

Returns
int ref_id @access public

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

169 {
170 global $ilDB;
171
172 static $seas_ref_id = 0;
173
174 if($seas_ref_id)
175 {
176 return $seas_ref_id;
177 }
178 $query = "SELECT object_reference.ref_id as ref_id FROM object_reference,tree,object_data ".
179 "WHERE tree.parent = ".$ilDB->quote(SYSTEM_FOLDER_ID,'integer')." ".
180 "AND object_data.type = 'seas' ".
181 "AND object_reference.ref_id = tree.child ".
182 "AND object_reference.obj_id = object_data.obj_id";
183
184 $res = $ilDB->query($query);
185 $row = $res->fetchRow(DB_FETCHMODE_OBJECT);
186
187 return $seas_ref_id = $row->ref_id;
188 }
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB

References $ilDB, $query, $res, $row, and DB_FETCHMODE_OBJECT.

Referenced by ilSearchController\executeCommand().

+ Here is the caller graph for this function:

◆ enableDateFilter()

ilSearchSettings::enableDateFilter (   $a_filter)

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

438 {
439 $this->date_filter = $a_filter;
440 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enabledIndex()

ilSearchSettings::enabledIndex ( )

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

191 {
192 global $ilDB;
193
194 if($ilDB->getDBType() == 'oracle')
195 {
196 return false;
197 }
198 return $this->index ? true : false;
199 }

References $ilDB.

Referenced by update().

+ Here is the caller graph for this function:

◆ enabledLucene()

ilSearchSettings::enabledLucene ( )

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

205 {
206 return $this->lucene ? true : false;
207 }

Referenced by ilSubItemListGUI\parseRelevance(), and update().

+ Here is the caller graph for this function:

◆ enableIndex()

ilSearchSettings::enableIndex (   $a_status)

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

201 {
202 $this->index = $a_status;
203 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLucene()

ilSearchSettings::enableLucene (   $a_status)

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

209 {
210 $this->lucene = $a_status ? true : false;
211 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneItemFilter()

ilSearchSettings::enableLuceneItemFilter (   $a_status)

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

297 {
298 $this->lucene_item_filter_enabled = $a_status;
299 }

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

361 {
362 $this->lucene_mime_filter_enabled = $a_stat;
363 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enableLuceneOfflineFilter()

ilSearchSettings::enableLuceneOfflineFilter (   $a_stat)

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

318 {
319 $this->lucene_offline_filter = $a_stat;
320 }

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

388 {
389 $this->user_search = $a_status;
390 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ enablePrefixWildcardQuery()

ilSearchSettings::enablePrefixWildcardQuery (   $a_stat)

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

152 {
153 $this->prefix_wildcard = $a_stat;
154 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ getAutoCompleteLength()

ilSearchSettings::getAutoCompleteLength ( )

Definition at line 255 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 222 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 112 of file class.ilSearchSettings.php.

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

References getLuceneItemFilter(), and isLuceneItemFilterEnabled().

+ Here is the call graph for this function:

◆ getEnabledLuceneMimeFilterDefinitions()

ilSearchSettings::getEnabledLuceneMimeFilterDefinitions ( )

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

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

References getLuceneMimeFilter(), and isLuceneItemFilterEnabled().

+ Here is the call graph for this function:

◆ getFragmentCount()

ilSearchSettings::getFragmentCount ( )

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

References $fragmentCount.

Referenced by update().

+ Here is the caller graph for this function:

◆ getFragmentSize()

ilSearchSettings::getFragmentSize ( )

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

238 {
239 return $this->fragmentSize;
240 }

References $fragmentSize.

Referenced by update().

+ Here is the caller graph for this function:

◆ getHideAdvancedSearch()

ilSearchSettings::getHideAdvancedSearch ( )

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

248 {
249 return $this->hide_adv_search ? true : false;
250 }

Referenced by update().

+ Here is the caller graph for this function:

◆ getInstance()

static ilSearchSettings::getInstance ( )
static
Returns
ilSearchSettings

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

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

References $instance, and ilSearchSettings().

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

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

◆ getLastIndexTime()

ilSearchSettings::getLastIndexTime ( )

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

290 {
291 return $this->last_index_date instanceof ilDateTime ?
292 $this->last_index_date :
293 new ilDateTime('2009-01-01 12:00:00',IL_CAL_DATETIME);
294 }
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 306 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 79 of file class.ilSearchSettings.php.

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

Referenced by ilObjSearchSettingsGUI\initFormSettings().

+ Here is the caller graph for this function:

◆ getLuceneMimeFilter()

ilSearchSettings::getLuceneMimeFilter ( )

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

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

Referenced by ilObjSearchSettingsGUI\initFormLuceneSettings().

+ Here is the caller graph for this function:

◆ getMaxHits()

ilSearchSettings::getMaxHits ( )

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

214 {
215 return $this->max_hits;
216 }

References $max_hits.

Referenced by update().

+ Here is the caller graph for this function:

◆ getMaxSubitems()

ilSearchSettings::getMaxSubitems ( )

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

275 {
276 return $this->numSubitems;
277 }

References $numSubitems.

Referenced by update().

+ Here is the caller graph for this function:

◆ ilSearchSettings()

ilSearchSettings::ilSearchSettings ( )

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

52 {
53 global $ilias;
54
55 $this->ilias =& $ilias;
56 $this->__read();
57 }

References $ilias, and __read().

Referenced by getInstance().

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

◆ isDateFilterEnabled()

ilSearchSettings::isDateFilterEnabled ( )

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

433 {
434 return $this->date_filter;
435 }

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 407 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 427 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 301 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 351 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 322 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 378 of file class.ilSearchSettings.php.

379 {
380 return $this->user_search;
381 }

References $user_search.

Referenced by update().

+ Here is the caller graph for this function:

◆ isPrefixWildcardQueryEnabled()

ilSearchSettings::isPrefixWildcardQueryEnabled ( )

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

References $prefix_wildcard.

Referenced by update().

+ Here is the caller graph for this function:

◆ isRelevanceVisible()

ilSearchSettings::isRelevanceVisible ( )

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

References $showRelevance.

Referenced by update().

+ Here is the caller graph for this function:

◆ isSubRelevanceVisible()

ilSearchSettings::isSubRelevanceVisible ( )

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

260 {
261 $this->auto_complete_length = $auto_complete_length;
262 }

References $auto_complete_length.

Referenced by __read().

+ Here is the caller graph for this function:

◆ setDefaultOperator()

ilSearchSettings::setDefaultOperator (   $a_op)

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

228 {
229 $this->default_operator = $a_op;
230 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentCount()

ilSearchSettings::setFragmentCount (   $a_count)

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

243 {
244 $this->fragmentCount = $a_count;
245 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setFragmentSize()

ilSearchSettings::setFragmentSize (   $a_size)

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

233 {
234 $this->fragmentSize = $a_size;
235 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setHideAdvancedSearch()

ilSearchSettings::setHideAdvancedSearch (   $a_status)

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

252 {
253 $this->hide_adv_search = $a_status;
254 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLastIndexTime()

ilSearchSettings::setLastIndexTime (   $time)
Parameters
objectinstance of ilDateTime

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

370 {
371 $this->last_index_date = $time;
372 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneItemFilter()

ilSearchSettings::setLuceneItemFilter (   $a_filter)

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

313 {
314 $this->lucene_item_filter = $a_filter;
315 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setLuceneMimeFilter()

ilSearchSettings::setLuceneMimeFilter (   $a_filter)

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

339 {
340 $this->lucene_mime_filter = $a_filter;
341 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setMaxHits()

ilSearchSettings::setMaxHits (   $a_max_hits)

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

218 {
219 $this->max_hits = $a_max_hits;
220 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ setMaxSubitems()

ilSearchSettings::setMaxSubitems (   $a_max)

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

270 {
271 $this->numSubitems = $a_max;
272 }

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

398 {
399 $this->show_inactiv_user = (bool) $a_visible;
400 }

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

418 {
419 $this->show_limited_user = (bool) $a_visible;
420 }

Referenced by __read().

+ Here is the caller graph for this function:

◆ showRelevance()

ilSearchSettings::showRelevance (   $a_status)

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

285 {
286 $this->showRelevance = (bool) $a_status;
287 }

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

328 {
329 $this->showSubRelevance = $a_stat;
330 }

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

443 {
444 global $ilSetting;
445
446 $this->ilias->setSetting('search_max_hits',$this->getMaxHits());
447 $this->ilias->setSetting('search_index',(int) $this->enabledIndex());
448 $this->ilias->setSetting('search_lucene',(int) $this->enabledLucene());
449
450 $this->ilias->setSetting('lucene_default_operator',$this->getDefaultOperator());
451 $this->ilias->setSetting('lucene_fragment_size',$this->getFragmentSize());
452 $this->ilias->setSetting('lucene_fragment_count',$this->getFragmentCount());
453 $this->ilias->setSetting('lucene_max_subitems',$this->getMaxSubitems());
454 $this->ilias->setSetting('lucene_show_relevance',$this->isRelevanceVisible());
455 $this->ilias->setSetting('lucene_last_index_time',$this->getLastIndexTime()->get(IL_CAL_UNIX));
456 $this->ilias->setSetting('hide_adv_search',(int) $this->getHideAdvancedSearch());
457 $this->ilias->setSetting('auto_complete_length',(int) $this->getAutoCompleteLength());
458 $this->ilias->setSetting('lucene_item_filter_enabled',(int) $this->isLuceneItemFilterEnabled());
459 $this->ilias->setSetting('lucene_item_filter',serialize($this->getLuceneItemFilter()));
460 $this->ilias->setSetting('lucene_offline_filter',(int) $this->isLuceneOfflineFilterEnabled());
461 $this->ilias->setSetting('lucene_mime_filter',serialize($this->getLuceneMimeFilter()));
462 $this->ilias->setSetting('lucene_sub_relevance',$this->isSubRelevanceVisible());
463 $ilSetting->set('lucene_mime_filter_enabled',$this->isLuceneMimeFilterEnabled());
464 $this->ilias->setSetting('lucene_prefix_wildcard',$this->isPrefixWildcardQueryEnabled());
465 $ilSetting->set('lucene_user_search',$this->isLuceneUserSearchEnabled());
466 $ilSetting->set('search_show_inactiv_user', $this->isInactiveUserVisible());
467 $ilSetting->set('search_show_limited_user', $this->isLimitedUserVisible());
468
469 $ilSetting->set('search_date_filter', $this->isDateFilterEnabled());
470
471 return true;
472 }
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 $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 ilSearchSettings().

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