1 search.module | search_index_split($text) |
Simplifies and splits a string into tokens for indexing.
File
- core/
modules/ search/ search.module, line 574 - Enables site-wide keyword searching.
Code
function search_index_split($text) {
$last = &backdrop_static(__FUNCTION__);
$lastsplit = &backdrop_static(__FUNCTION__ . ':lastsplit');
if ($last == $text) {
return $lastsplit;
}
// Process words
$text = search_simplify($text);
$words = explode(' ', $text);
// Save last keyword result
$last = $text;
$lastsplit = $words;
return $words;
}