/**
  * Returns a list of the index words from the random string $string,
  * which can be used for searching.
  * From the random string $string the following words will be deleted:
  * - shorter than PRODUCT_SEARCH_MIN_WORD_LENGTH
  * - longer than PRODUCT_SEARCH_MAX_WORD_LENGTH
  * - all HTML tags and HTML-characters
  *
  * @param string $string Search pattern
  * @return array Index words list
  */
 function getIndexWordList($string)
 {
     return getIndexWordsFromText($string);
 }
 function setFilterByText($text)
 {
     if (Validator::isValidStringMinLength($text, 2)) {
         $user_input = $text;
         $index_words_list = getIndexWordsFromText($text);
         modApiFunc('Session', 'set', 'TimelineTextFilter', array($user_input, $index_words_list));
     } else {
         modApiFunc('Session', 'un_set', 'TimelineTextFilter');
     }
 }