| 7 search.module | search_index_split($text) |
| 4.7 search.module | search_index_split($text) |
| 5 search.module | search_index_split($text) |
| 6 search.module | search_index_split($text) |
| 8 search.module | search_index_split($text, $langcode = NULL) |
Splits a string into tokens for indexing.
1 call to search_index_split()
- search_index in modules/
search/ search.module - Update the full-text search index for a particular item.
File
- modules/
search/ search.module, line 370 - Enables site-wide keyword searching.
Code
function search_index_split($text) {
static $last = NULL;
static $lastsplit = NULL;
if ($last == $text) {
return $lastsplit;
}
// Process words
$text = search_simplify($text);
$words = explode(' ', $text);
array_walk($words, '_search_index_truncate');
// Save last keyword result
$last = $text;
$lastsplit = $words;
return $words;
}