hook_search_preprocess
developer/hooks/core.php, строка 1291
- Версии
- 5 – 6
hook_search_preprocess($text)
Пред-обработка текста перед занесением в поисковой индекс.
This hook is called both for text added to the search index, as well as the keywords users have submitted for searching.
This is required for example to allow Japanese or Chinese text to be searched. As these languages do not use spaces, it needs to be split into separate words before it can be indexed. There are various external libraries for this.
Параметры
$text
The text to split. This is a single piece of plain-text that was
extracted from between two HTML tags. Will not contain any HTML entities.
Возвращаемое значение
The text after processing.
Связанные темы
Код
<?php
function hook_search_preprocess($text) {
// Do processing on $text
return $text;
}
?>
Войдите или зарегистрируйтесь, чтобы получить возможность отправлять комментарии