Class: Entities_IndexLogic
Source Location: /lodel/scripts/logic/class.entities_index.php
Class Entities_IndexLogic
Class Overview
|
Classe de logique des entités (gestion de l'indexation dans le moteur de recherche)
Located in /lodel/scripts/logic/class.entities_index.php [line 60]
Logic
|
--Entities_IndexLogic
Author(s):
- Ghislain Picard
- Jean Lamy
API Tags:
Information Tags:
| Version: | CVS:$Id: |
| Copyright: | 2003, Ghislain Picard, Marin Dacos, Luc Santeramo, Nicolas Nutten, Anne Gentil-Beccot |
| Copyright: | 2001-2002, Ghislain Picard, Marin Dacos |
| Copyright: | 2004, Ghislain Picard, Marin Dacos, Luc Santeramo, Anne Gentil-Beccot, Bruno Cénou |
| Copyright: | 2005, Ghislain Picard, Marin Dacos, Luc Santeramo, Gautier Poupeau, Jean Lamy, Bruno Cénou |
| Copyright: | 2006, Marin Dacos, Luc Santeramo, Bruno Cénou, Jean Lamy, Mikaël Cixous, Sophie Malafosse |
| Copyright: | 2007, Marin Dacos, Bruno Cénou, Sophie Malafosse, Pierre-Alain Mignot |
| Since: | Classe ajouté depuis la version 0.8 |
|
Properties
|
Methods
|
Inherited Properties, Constants, and Methods
Property Summary
| array |
$g_name |
Tableau des équivalents génériques |
Method Summary
| void |
addIndexAction() |
Add an object to the search_engine. An object is added only its type must be indexed and if its fields have weight defined > 0 |
| void |
_indexField() |
index a given field in the database (using dao_index) |
Properties
Tableau des équivalents génériques
Methods
Entities_IndexLogic Entities_IndexLogic(
)
|
|
Constructeur
void addIndexAction(
array
&$context, array
&$error
)
|
|
Add an object to the search_engine. An object is added only its type must be indexed and if its fields have weight defined > 0
Parameters:
|
array |
&$context: |
le contexte passé par référence |
|
array |
&$error: |
le tableau des erreurs éventuelles passé par référence |
void cleanIndexAction(
array
&$context, array
&$error
)
|
|
clean the index of all objet
Parameters:
|
array |
&$context: |
le contexte passé par référence |
|
array |
&$error: |
le tableau des erreurs éventuelles passé par référence |
void deleteIndexAction(
array
&$context, array
&$error
)
|
|
delete an objet from the index
needed parameters
Parameters:
|
array |
&$context: |
le contexte passé par référence |
|
array |
&$error: |
le tableau des erreurs éventuelles passé par référence |
void rebuildIndexAction(
array
&$context, array
&$error
)
|
|
Rebuild entirely the Index
Parameters:
|
array |
&$context: |
le contexte passé par référence |
|
array |
&$error: |
le tableau des erreurs éventuelles passé par référence |
an _cleanAndcountTokens(
$string
$string, [$regs
$regs = 0]
)
|
|
Function to split a string into tokens
Parameters:
|
$string |
$string: |
the string to be clean and word count |
|
$regs |
$regs: |
the regs used to clean the string |
API Tags:
| Return: | array with for each word its count |
| Access: | private |
$text _decode_html_entities(
$text
$text
)
|
|
Private function
Description : decode HTML entities,
Parameters:
|
$text |
$text: |
the text where HTML entities must be decoded |
API Tags:
| Return: | the text with HTML entities decoded |
| Access: | private |
void _indexEntitiesRelations(
$id
$id, $nature
$nature, $daoIndex
$daoIndex
)
|
|
Generic function to index relations of type entries and persons : E and G relations
Parameters:
|
$id |
$id: |
the id of the entity |
|
$nature |
$nature: |
the nature of the relation |
|
$daoIndex |
$daoIndex: |
the DAO object |
API Tags:
void _indexField(
$id
$id, $fieldValue
$fieldValue, $fieldName
$fieldName, $fieldWeight
$fieldWeight, $daoIndex
$daoIndex, [$prefixtablefield
$prefixtablefield = '']
)
|
|
index a given field in the database (using dao_index)
Parameters:
|
$id |
$id: |
: entity database identifier |
|
$fieldValue |
$fieldValue: |
: the value of the field |
|
$fieldName |
$fieldName: |
: the name of the field |
|
$fieldWeight |
$fieldWeight: |
: the weight used to ponderate the field |
|
$daoIndex |
$daoIndex: |
: the dao to use to save the data |
|
$prefixtablefield |
$prefixtablefield: |
: empty by default but used to prefix the field 'tablefield' (for entries or persons for example) |
an _splitInTokens(
$string
$string, [$regs
$regs = 0]
)
|
|
Split a string into tokens by given regs
Parameters:
|
$string |
$string: |
the string to be splitted |
|
$regs |
$regs: |
the regs used to split the string |
API Tags:
| Return: | array of tokens |
| Access: | private |
|
|