Simplifies and splits a string into tokens for indexing.
function search_index_split($text, $langcode = NULL) {
$last =& drupal_static(__FUNCTION__);
$lastsplit =& drupal_static(__FUNCTION__ . ':lastsplit');
if ($last == $text) {
return $lastsplit;
}
// Process words
$text = search_simplify($text, $langcode);
$words = explode(' ', $text);
// Save last keyword result
$last = $text;
$lastsplit = $words;
return $words;
}