Joomla CMS
3.10.11 (avec JPlatform 13.1 inclus)
Documentation des API du CMS Joomla en version 3.10.11 et du framework Joomla Platform intégré
|
Fonctions membres publiques | |
__construct () | |
index ($item, $format='html') | |
remove ($linkId) | |
optimize () | |
Fonctions membres publiques statiques | |
static | getInstance () |
static | getState () |
static | setState ($data) |
static | resetState () |
Champs de données | |
const | TITLE_CONTEXT = 1 |
const | TEXT_CONTEXT = 2 |
const | META_CONTEXT = 3 |
const | PATH_CONTEXT = 4 |
const | MISC_CONTEXT = 5 |
Attributs publics statiques | |
static | $state |
static | $profiler |
Fonctions membres protégées | |
tokenizeToDb ($input, $context, $lang, $format) | |
addTokensToDb ($tokens, $context='') | |
toggleTables ($memory) | |
Fonctions membres protégées statiques | |
static | getSignature ($item) |
Attributs protégés | |
$db | |
$addTokensToDbQueryTemplate | |
Fonctions membres privées | |
tokenizeToDbShort ($input, $context, $lang, $format, $count) | |
Main indexer class for the Finder indexer package.
The indexer class provides the core functionality of the Finder search engine. It is responsible for adding and updating the content links table; extracting and scoring tokens; and maintaining all referential information for the content.
Note: All exceptions thrown from within this class should be caught by the controller.
__construct | ( | ) |
FinderIndexer constructor.
Set up query template for addTokensToDb, we will be cloning this template when needed. This is about twice as fast as calling the clear function or setting up a new object.
Références $db.
|
protected |
Method to add a set of tokens to the database.
mixed | $tokens | An array or single FinderIndexerToken object. |
mixed | $context | The context of the tokens. See context constants. [optional] |
Exception | on database error. |
|
static |
Returns a reference to the FinderIndexer object.
RuntimeException | if driver class for indexer not present. |
Références $class, $path, et JLoader\register().
Référencé par FinderIndexerAdapter\__construct(), et FinderControllerIndexer\optimize().
|
staticprotected |
|
static |
Method to get the indexer state.
Références $data, $state, FinderIndexerHelper\$stemmer, FinderIndexerStemmer\getInstance(), et null.
Référencé par FinderControllerIndexer\batch(), FinderCli\index(), FinderIndexerAdapter\onBeforeIndex(), FinderIndexerAdapter\onBuildIndex(), FinderIndexerAdapter\onStartIndex(), FinderControllerIndexer\optimize(), et FinderControllerIndexer\start().
|
abstract |
Method to index a content item.
FinderIndexerResult | $item | The content item to index. |
string | $format | The format of the content. [optional] |
Exception | on database error. |
|
abstract |
Method to optimize the index. We use this method to remove unused terms and any other optimizations that might be necessary.
Exception | on database error. |
remove | ( | $linkId | ) |
Method to remove a link from the index.
integer | $linkId | The id of the link. |
Exception | on database error. |
Références $db, $i, $query, FinderIndexerTaxonomy\removeMaps(), et FinderIndexerTaxonomy\removeOrphanNodes().
|
static |
Method to reset the indexer state.
Référencé par FinderCli\index(), et FinderControllerIndexer\start().
|
static |
Method to set the indexer state.
object | $data | A new indexer state object. |
Référencé par FinderControllerIndexer\batch(), FinderIndexerAdapter\onBuildIndex(), et FinderIndexerAdapter\onStartIndex().
|
protected |
Method to switch the token tables from Memory tables to Disk tables when they are close to running out of memory. Since this is not supported/implemented in all DB-drivers, the default is a stub method, which simply returns true.
boolean | $memory | Flag to control how they should be toggled. |
Exception | on database error. |
|
protected |
Method to parse input, tokenize it, and then add it to the database.
mixed | $input | String or resource to use as input. A resource input will automatically be chunked to conserve memory. Strings will be chunked if longer than 2K in size. |
integer | $context | The context of the input. See context constants. |
string | $lang | The language of the input. |
string | $format | The format of the input. |
Références $buffer, $context, $count, $format, $input, $lang, et null.
|
private |
Method to parse input, tokenise it, then add the tokens to the database.
string | $input | String to parse, tokenise and add to database. |
integer | $context | The context of the input. See context constants. |
string | $lang | The language of the input. |
string | $format | The format of the input. |
integer | $count | The number of tokens processed so far. |
Références $context, $count, $format, $input, $lang, $state, FinderIndexerHelper\parse(), et FinderIndexerHelper\tokenize().
|
protected |
|
protected |
|
static |
|
static |
const META_CONTEXT = 3 |
const MISC_CONTEXT = 5 |
const PATH_CONTEXT = 4 |
const TEXT_CONTEXT = 2 |
Référencé par PlgSystemFields\onPrepareFinderContent().
const TITLE_CONTEXT = 1 |