PHP Класс eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler Database handler.

Открытые методы

Метод Описание
__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.

Приватные методы

Метод Описание
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).

Описание методов

__construct() публичный Метод

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

addWords() публичный Метод

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

decrementWordObjectCount() публичный Метод

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

deleteWordsWithoutObjects() публичный Метод

Delete words not related to any content object.

getContentObjectWords() публичный Метод

Get all words related to the content object (legacy db table: ezsearch_object_word_link).
public getContentObjectWords ( $contentId ) : array
$contentId
Результат array

getWords() публичный Метод

Fetch already indexed words from database (legacy db table: ezsearch_word).
public getWords ( array $words ) : array
$words array
Результат array

incrementWordObjectCount() публичный Метод

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

purge() публичный Метод

Remove entire search index.
public purge ( )

Описание свойств

$dbHandler защищенное свойство

Database handler.
protected DatabaseHandler,eZ\Publish\Core\Persistence\Database $dbHandler
Результат eZ\Publish\Core\Persistence\Database\DatabaseHandler