Helper class for the Finder indexer package.
- Depuis
- 2.5
◆ addContentType()
static addContentType |
( |
|
$title, |
|
|
|
$mime = null |
|
) |
| |
|
static |
Method to add a content type to the database.
- Paramètres
-
string | $title | The type of content. For example: PDF |
string | $mime | The mime type of the content. For example: PDF [optional] |
- Renvoie
- integer The id of the content type.
- Depuis
- 2.5
- Exceptions
-
Exception | on database error. |
Références $db, $query, $title, et Factory\getDbo().
Référencé par Adapter\__construct().
◆ getCommonWords()
static getCommonWords |
( |
|
$lang | ) |
|
|
static |
Method to get an array of common terms for a language.
- Paramètres
-
string | $lang | The language to use. |
- Renvoie
- array Array of common terms.
- Depuis
- 2.5
- Exceptions
-
Exception | on database error. |
Références $db, $lang, $query, et Factory\getDbo().
◆ getContentExtras()
static getContentExtras |
( |
Result |
$item | ) |
|
|
static |
Method to get extra data for a content before being indexed. This is how we add Comments, Tags, Labels, etc. that should be available to Finder.
- Paramètres
-
- Renvoie
- boolean True on success, false on failure.
- Depuis
- 2.5
- Exceptions
-
Exception | on database error. |
Références $item, Factory\getApplication(), et PluginHelper\importPlugin().
◆ getDefaultLanguage()
static getDefaultLanguage |
( |
| ) |
|
|
static |
◆ getPrimaryLanguage()
static getPrimaryLanguage |
( |
|
$lang | ) |
|
|
static |
◆ isCommon()
static isCommon |
( |
|
$token, |
|
|
|
$lang |
|
) |
| |
|
static |
◆ parse()
static parse |
( |
|
$input, |
|
|
|
$format = 'html' |
|
) |
| |
|
static |
◆ prepareContent()
◆ stem()
static stem |
( |
|
$token, |
|
|
|
$lang |
|
) |
| |
|
static |
◆ tokenize()
static tokenize |
( |
|
$input, |
|
|
|
$lang, |
|
|
|
$phrase = false |
|
) |
| |
|
static |
Method to tokenize a text string.
- Paramètres
-
string | $input | The input to tokenize. |
string | $lang | The language of the input. |
boolean | $phrase | Flag to indicate whether input could be a phrase. [optional] |
- Renvoie
- Token[] An array of Token objects.
- Depuis
- 2.5
We want to cache the most common words/tokens. At the same time we don't want to cache too much. The most common words will also be early in the text, so we are dropping all terms/tokens which have been cached later.
Références $config, $i, $input, $key, $lang, $language, $n, $params, $temp, elseif, Language\getInstance(), ComponentHelper\getParams(), et Multilanguage\isEnabled().
Référencé par Query\processString(), et Indexer\tokenizeToDbShort().
La documentation de cette classe a été générée à partir du fichier suivant :