function search_index_split

Same name and namespace in other branches
  1. 6.x drupal-6.x/modules/search/search.module \search_index_split()

Simplifies and splits a string into tokens for indexing.

1 call to search_index_split()
search_index in drupal-7.x/modules/search/search.module
Update the full-text search index for a particular item.

Archivo

drupal-7.x/modules/search/search.module, line 504
Enables site-wide keyword searching.

Código

function search_index_split($text) {
  $last = &drupal_static(__FUNCTION__);
  $lastsplit = &drupal_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;
}