search_index_split
- Versions
- 4.7 – 7
search_index_split($text)
Splits a string into tokens for indexing.
Code
modules/search.module, line 398
<?php
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;
}
?>Login or register to post comments 