| [ 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. triggers: INDEXER_VERSION_GET author: Tom N Harris <tnharris@whoopdedo.org> author: Michael Hamann <michael@content-space.de> return: int|string |
| wordlen($w) X-Ref |
| Measure the length of a string. Differs from strlen in handling of asian characters. param: string $w author: Tom N Harris <tnharris@whoopdedo.org> return: int |
| idx_get_indexer() X-Ref |
| Create an instance of the indexer. author: Tom N Harris <tnharris@whoopdedo.org> return: Indexer an Indexer |
| 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 param: array $words list of words to search for return: array list of pages found, associated with the search terms |
| idx_tokenizer($string, $wc = false) X-Ref |
| Split a string into tokens param: string $string param: bool $wc return: array |
| idx_getIndex($idx, $suffix) X-Ref |
| Read the list of words in an index (if it exists). param: string $idx param: string $suffix author: Tom N Harris <tnharris@whoopdedo.org> return: array |
| 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. author: YoBoY <yoboy.leguesh@gmail.com> return: array |
| 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. param: array|int $filter author: YoBoY <yoboy.leguesh@gmail.com> return: array |
| 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. param: string $name author: Tom N Harris <tnharris@whoopdedo.org> return: string |