PHP Class eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex

Afficher le fichier Open project: ezsystems/ezpublish-kernel Class Usage Examples

Protected Properties

Свойство Type Description
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler Database handler.

Méthodes publiques

Méthode Description
__construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler ) SearchIndex constructor.
addObjectWordLink ( $wordId, $contentId, $frequency, $placement, $nextWordId, $prevWordId, $contentTypeId, $fieldTypeId, $published, $sectionId, $identifier, $integerValue ) Link word with specific content object (legacy db table: ezsearch_object_word_link).
addWords ( array $words ) Insert new words (legacy db table: ezsearch_word).
decrementWordObjectCount ( array $wordId ) Decrease the object count of the given words by one.
deleteObjectWordsLink ( $contentId ) Delete relation between a word and a content object.
deleteWordsWithoutObjects ( ) Delete words not related to any content object.
getContentObjectWords ( $contentId ) : array Get all words related to the content object (legacy db table: ezsearch_object_word_link).
getWords ( array $words ) : array Fetch already indexed words from database (legacy db table: ezsearch_word).
incrementWordObjectCount ( array $wordId ) Increase the object count of the given words by one.
purge ( ) Remove entire search index.

Private Methods

Méthode Description
setContentObjectWordsSelectQuery ( eZ\Publish\Core\Persistence\Database\SelectQuery $query ) Set query selecting word ids for content object (method was extracted to be reusable).
updateWordObjectCount ( array $wordId, array $columns ) Update object count for words (legacy db table: ezsearch_word).

Method Details

__construct() public méthode

SearchIndex constructor.
public __construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler )
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler

addWords() public méthode

Insert new words (legacy db table: ezsearch_word).
public addWords ( array $words )
$words array

decrementWordObjectCount() public méthode

Decrease the object count of the given words by one.
public decrementWordObjectCount ( array $wordId )
$wordId array

deleteWordsWithoutObjects() public méthode

Delete words not related to any content object.

getContentObjectWords() public méthode

Get all words related to the content object (legacy db table: ezsearch_object_word_link).
public getContentObjectWords ( $contentId ) : array
$contentId
Résultat array

getWords() public méthode

Fetch already indexed words from database (legacy db table: ezsearch_word).
public getWords ( array $words ) : array
$words array
Résultat array

incrementWordObjectCount() public méthode

Increase the object count of the given words by one.
public incrementWordObjectCount ( array $wordId )
$wordId array

purge() public méthode

Remove entire search index.
public purge ( )

Property Details

$dbHandler protected_oe property

Database handler.
protected DatabaseHandler,eZ\Publish\Core\Persistence\Database $dbHandler
Résultat eZ\Publish\Core\Persistence\Database\DatabaseHandler