35 define(
'QP_COMBINATION_AND',
'and');
36 define(
'QP_COMBINATION_OR',
'or');
59 define(MIN_WORD_LENGTH,3);
63 $this->query_str = $a_query_str;
66 include_once
'./Services/Search/classes/class.ilSearchSettings.php';
80 if(!$a_force and $this->settings->enabledIndex() and $a_length < 3)
82 $GLOBALS[
'ilLog']->write(__METHOD__.
': Disabled min word length');
85 $this->min_word_length = $a_length;
95 $this->message = $a_msg;
105 $this->message .=
'<br />';
107 $this->message .= $a_msg;
112 $this->combination = $a_combination;
121 return trim($this->query_str);
125 return $this->words ? $this->words : array();
132 return $this->quoted_words ? $this->quoted_words : array();
136 foreach($this->quoted_words as $word)
138 $tmp_word[] = str_replace(
'\"',
'',$word);
140 return $tmp_word ? $tmp_word : array();
159 $this->words = array();
161 #if(!strlen($this->getQueryString()))
167 foreach($words as $word)
169 if(!strlen(trim($word)))
176 $this->
setMessage($this->lng->txt(
'search_minimum_three'));
193 $this->quoted_words[] =
'';
197 while(preg_match(
"/\".*?\"/",
$query_str,$matches))
205 foreach($words as $word)
207 if(!strlen(trim($word)))
226 $this->
setMessage($this->lng->txt(
'msg_no_search_string'));