Inicio › API reference ›
hook_search_preprocess
hooks/core.php, line 1678
- Versions
- hooks
hook_search_preprocess($text)
Preprocess text for the search index.
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.
Parameters
$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.
Valor de retorno
The text after processing.
Código
<?php
function hook_search_preprocess($text) {
// Do processing on $text
return $text;
}
?> 
Comentarios recientes
hace 17 horas 50 mins
hace 1 día 10 horas
hace 1 semana 21 horas
hace 14 semanas 4 días
hace 19 semanas 19 horas
hace 20 semanas 2 días
hace 20 semanas 5 días
hace 20 semanas 5 días
hace 21 semanas 2 días
hace 22 semanas 1 día