35 public $object_types =
array(
'cat',
'dbk',
'crs',
'fold',
'frm',
'grp',
'lm',
'sahs',
'glo',
'mep',
'htlm',
'exc',
'file',
'qpl',
'tst',
'svy',
'spl',
36 'chat',
'webr',
'mcst',
'sess',
'pg',
'st',
'wiki',
'book');
49 $this->query_parser = $qp_obj;
52 include_once
'Services/Search/classes/class.ilSearchResult.php';
84 if (is_array($a_filter)) {
85 $this->object_types = $a_filter;
96 $this->id_filter = $a_id_filter;
115 if (is_array($this->object_types)) {
116 if (in_array(
$a_type, $this->object_types)) {
120 $this->object_types[] =
$a_type;
133 return $this->object_types ? $this->object_types :
array();
145 if ($this->query_parser->getCombination() ==
'or') {
148 if (count($this->
fields) > 1) {
149 foreach ($this->
fields as $field) {
150 $tmp_fields[] =
array($field,
'text');
152 $complete_str = $ilDB->concat($tmp_fields);
160 $complete_str = $this->
fields[0];
164 foreach ($this->query_parser->getQuotedWords() as $word) {
166 $locate .= $ilDB->locate($ilDB->quote($word,
'text'), $complete_str);
169 #$locate .= (", LOCATE('".$word."',".$complete_str.") "); 170 #$locate .= ("as found".$counter++." "); 178 if ($this->query_parser->getCombination() ==
'or') {
182 foreach ($this->query_parser->getQuotedWords() as $word) {
184 $found[] =
$row->$res_found;
186 return $found ? $found :
array();
191 echo
"Should be overwritten.";
getFields()
Get fields to search.
__construct($qp_obj)
Constructor public.
__createLocateString()
build locate string in case of AND search
setIdFilter($a_id_filter)
Set id filter Filters search by given object id.
setFilter($a_filter)
set object type to search in
setFields($a_fields)
Set fields to search.
getFilter()
get object type to search in
getIdFilter()
Get Id filter.
Create styles array
The data for the language used.
appendToFilter($a_type)
Append object type to filter.