[ Index ] |
PHP Cross Reference of DokuWiki |
[Source view] [Print] [Project Stats]
Functions to create the fulltext search index
Author: | Andreas Gohr |
Author: | Tom N Harris |
License: | GPL 2 (http://www.gnu.org/licenses/gpl.html) |
File Size: | 382 lines (11 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
idx_get_version() X-Ref |
Version of the indexer taking into consideration the external tokenizer. The indexer is only compatible with data written by the same version. return: int|string triggers: INDEXER_VERSION_GET author: Tom N Harris <tnharris@whoopdedo.org> author: Michael Hamann <michael@content-space.de> |
wordlen($w) X-Ref |
Measure the length of a string. Differs from strlen in handling of asian characters. return: int author: Tom N Harris <tnharris@whoopdedo.org> param: string $w |
idx_get_indexer() X-Ref |
Create an instance of the indexer. return: Indexer an Indexer author: Tom N Harris <tnharris@whoopdedo.org> |
idx_addPage($page, $verbose = false, $force = false) X-Ref |
No description |
idx_lookup(&$words) X-Ref |
Find tokens in the fulltext index Takes an array of words and will return a list of matching pages for each one. Important: No ACL checking is done here! All results are returned, regardless of permissions return: array list of pages found, associated with the search terms param: array $words list of words to search for |
idx_tokenizer($string, $wc = false) X-Ref |
Split a string into tokens return: array param: string $string param: bool $wc |
idx_getIndex($idx, $suffix) X-Ref |
Read the list of words in an index (if it exists). return: array author: Tom N Harris <tnharris@whoopdedo.org> param: string $idx param: string $suffix |
idx_listIndexLengths() X-Ref |
Get the list of lengths indexed in the wiki. Read the index directory or a cache file and returns a sorted array of lengths of the words used in the wiki. return: array author: YoBoY <yoboy.leguesh@gmail.com> |
idx_indexLengths($filter) X-Ref |
Get the word lengths that have been indexed. Reads the index directory and returns an array of lengths that there are indices for. return: array author: YoBoY <yoboy.leguesh@gmail.com> param: array|int $filter |
idx_cleanName($name) X-Ref |
Clean a name of a key for use as a file name. Romanizes non-latin characters, then strips away anything that's not a letter, number, or underscore. return: string author: Tom N Harris <tnharris@whoopdedo.org> param: string $name |