[ Index ] |
|
Code source de DokuWiki 2006-11-06 |
[Code source] [Imprimer] [Statistiques]
Common DokuWiki functions
Author: | Andreas Gohr <andi@splitbrain.org> |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
Poids: | 405 lignes (13 kb) |
Inclus ou requis: | 3 fois |
Référencé: | 0 fois |
Nécessite: | 3 fichiers inc/utf8.php inc/parserutils.php inc/io.php |
idx_getPageWords($page) X-Ref |
Split a page into words Returns an array of of word counts, false if an error occured author: Andreas Gohr <andi@splitbrain.org> author: Christopher Smith <chris@jalakai.co.uk> |
idx_addPage($page) X-Ref |
Adds/updates the search for the given page This is the core function of the indexer which does most of the work. This function needs to be called with proper locking! author: Andreas Gohr <andi@splitbrain.org> |
idx_writeIndexLine($fh,$line,$pid,$count) X-Ref |
Write a new index line to the filehandle This function writes an line for the index file to the given filehandle. It removes the given document from the given line and readds it when $count is >0. author: Andreas Gohr <andi@splitbrain.org> |
idx_lookup($words) X-Ref |
Lookup words in index Takes an array of word and will return a list of matching documents for each one. Important: No ACL checking is done here! All results are returned, regardless of permissions author: Andreas Gohr <andi@splitbrain.org> |
idx_parseIndexLine(&$page_idx,$line) X-Ref |
Returns a list of documents and counts from a index line It omits docs with a count of 0 and pages that no longer exist. author: Andreas Gohr <andi@splitbrain.org> param: array $page_idx The list of known pages param: string $line A line from the main index |
idx_tokenizer($string,&$stopwords,$wc=false) X-Ref |
Tokenizes a string into an array of search words Uses the same algorithm as idx_getPageWords() param: string $string the query as given by the user param: arrayref $stopwords array of stopwords param: boolean $wc are wildcards allowed? |
Généré le : Tue Apr 3 20:47:31 2007 | par Balluche grâce à PHPXref 0.7 |