57 if(self::$instance == null)
72 'crs' => array(
'filter' =>
'type:crs',
'trans' =>
'objs_crs'),
73 'grp' => array(
'filter' =>
'type:grp',
'trans' =>
'objs_grp'),
74 'lms' => array(
'filter' =>
'type:lm OR type:htlm OR type:sahs OR type:dbk',
'trans' =>
'learning_resource'),
75 'glo' => array(
'filter' =>
'type:glo',
'trans' =>
'objs_glo'),
76 'mep' => array(
'filter' =>
'type:mep',
'trans' =>
'objs_mep'),
77 'tst' => array(
'filter' =>
'type:tst OR type:svy OR type:qpl OR type:spl',
'trans' =>
'search_tst_svy'),
78 'frm' => array(
'filter' =>
'type:frm',
'trans' =>
'objs_frm'),
79 'exc' => array(
'filter' =>
'type:exc',
'trans' =>
'objs_exc'),
80 'file' => array(
'filter' =>
'type:file',
'trans' =>
'objs_file'),
81 'mcst' => array(
'filter' =>
'type:mcst',
'trans' =>
'objs_mcst'),
82 'wiki' => array(
'filter' =>
'type:wiki',
'trans' =>
'objs_wiki')
100 foreach(self::getLuceneItemFilterDefinitions() as $obj => $def)
102 if(isset($filter[$obj]) and $filter[$obj])
104 $enabled[$obj] = $def;
119 static $seas_ref_id = 0;
125 $query =
"SELECT object_reference.ref_id as ref_id FROM object_reference,tree,object_data ".
126 "WHERE tree.parent = ".$ilDB->quote(SYSTEM_FOLDER_ID,
'integer').
" ".
127 "AND object_data.type = 'seas' ".
128 "AND object_reference.ref_id = tree.child ".
129 "AND object_reference.obj_id = object_data.obj_id";
134 return $seas_ref_id =
$row->ref_id;
141 if($ilDB->getDBType() ==
'oracle')
145 return $this->index ?
true :
false;
149 $this->index = $a_status;
153 return $this->lucene ?
true :
false;
157 $this->lucene = $a_status ?
true :
false;
166 $this->max_hits = $a_max_hits;
177 $this->default_operator = $a_op;
182 $this->fragmentSize = $a_size;
192 $this->fragmentCount = $a_count;
197 return $this->hide_adv_search ?
true :
false;
201 $this->hide_adv_search = $a_status;
219 $this->numSubitems = $a_max;
239 return $this->last_index_date instanceof
ilDateTime ?
240 $this->last_index_date :
246 $this->lucene_item_filter_enabled = $a_status;
261 $this->lucene_item_filter = $a_filter;
266 $this->lucene_offline_filter = $a_stat;
279 $this->last_index_date = $time;
286 $this->ilias->setSetting(
'search_max_hits',$this->
getMaxHits());
287 $this->ilias->setSetting(
'search_index',(
int) $this->
enabledIndex());
288 $this->ilias->setSetting(
'search_lucene',(
int) $this->
enabledLucene());
291 $this->ilias->setSetting(
'lucene_fragment_size',$this->
getFragmentSize());
292 $this->ilias->setSetting(
'lucene_fragment_count',$this->
getFragmentCount());
293 $this->ilias->setSetting(
'lucene_max_subitems',$this->
getMaxSubitems());
300 #$this->ilias->setSetting('lucene_offline_filter',(int) $this->isLuceneOfflineFilterEnabled());
308 $this->
setMaxHits($this->ilias->getSetting(
'search_max_hits',10));
309 $this->
enableIndex($this->ilias->getSetting(
'search_index',0));
310 $this->
enableLucene($this->ilias->getSetting(
'search_lucene',0));
312 $this->
setDefaultOperator($this->ilias->getSetting(
'lucene_default_operator',self::OPERATOR_AND));
313 $this->
setFragmentSize($this->ilias->getSetting(
'lucene_fragment_size',50));
314 $this->
setFragmentCount($this->ilias->getSetting(
'lucene_fragment_count',3));
315 $this->
setMaxSubitems($this->ilias->getSetting(
'lucene_max_subitems',5));
316 $this->
showRelevance($this->ilias->getSetting(
'lucene_show_relevance',
true));
318 if($time = $this->ilias->getSetting(
'lucene_last_index_time',
false))
328 $this->
setAutoCompleteLength($this->ilias->getSetting(
'auto_complete_length',$this->getAutoCompleteLength()));
330 $this->
enableLuceneItemFilter($this->ilias->getSetting(
'lucene_item_filter_enabled',(
int) $this->isLuceneItemFilterEnabled()));
332 $filter = $this->ilias->getSetting(
'lucene_item_filter',serialize($this->
getLuceneItemFilter()));
334 #$this->enableLuceneOfflineFilter($this->ilias->getSetting('lucene_offline_filter'), $this->isLuceneOfflineFilterEnabled());