PHP Класс eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase

Наследование: extends eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway
Показать файл Открыть проект

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

Свойство Тип Описание
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler Database handler.
$fullTextSearchConfiguration array Full text search configuration options.
$searchIndex eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex Need this for queries on ezsearch* tables
$transformationProcessor eZ\Publish\Core\Persistence\TransformationProcessor Need this for being able to transform text to searchable value
$typeHandler eZ\Publish\SPI\Persistence\Content\Type\Handler Need this for being able to pick fields that are searchable.

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

Метод Описание
__construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler, eZ\Publish\SPI\Persistence\Content\Type\Handler $typeHandler, TransformationProcessor $transformationProcessor, SearchIndex $searchIndex, array $fullTextSearchConfiguration ) Construct from handler handler.
bulkIndex ( array $fullTextBulkData ) Indexes an array of FullTextData objects.
index ( FullTextData $fullTextData ) Index search engine full text data corresponding to content object field values.
purgeIndex ( ) Remove entire search index.
remove ( mixed $contentId, mixed | null $versionId = null ) : boolean Remove whole content or a specific version from index.

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

Метод Описание
buildWordIDArray ( array $indexArrayOnlyWords ) : array Build WordIDArray and update ezsearch_word table.
indexWords ( FullTextData $fullTextData, array $indexArray, array $wordIDArray, integer $placement ) : integer Index wordIndex.

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

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

Construct from handler handler.
public __construct ( eZ\Publish\Core\Persistence\Database\DatabaseHandler $dbHandler, eZ\Publish\SPI\Persistence\Content\Type\Handler $typeHandler, TransformationProcessor $transformationProcessor, SearchIndex $searchIndex, array $fullTextSearchConfiguration )
$dbHandler eZ\Publish\Core\Persistence\Database\DatabaseHandler
$typeHandler eZ\Publish\SPI\Persistence\Content\Type\Handler
$transformationProcessor eZ\Publish\Core\Persistence\TransformationProcessor
$searchIndex eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex
$fullTextSearchConfiguration array

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

Note: on large amounts of data make sure to iterate with several calls to this function with a limited set of FullTextData objects. Amount you have memory for depends on server, size of FullTextData objects & PHP version.
public bulkIndex ( array $fullTextBulkData )
$fullTextBulkData array

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

Ported from the legacy code
См. также: https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L45
public index ( FullTextData $fullTextData )
$fullTextData eZ\Publish\Core\Search\Legacy\Content\FullTextData

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

Remove entire search index.
public purgeIndex ( )

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

Ported from the legacy code
См. также: https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L386
public remove ( mixed $contentId, mixed | null $versionId = null ) : boolean
$contentId mixed
$versionId mixed | null
Результат boolean

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

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

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

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

Full text search configuration options.
protected array $fullTextSearchConfiguration
Результат array

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

Need this for queries on ezsearch* tables
protected SearchIndex,eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository $searchIndex
Результат eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex

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

Need this for being able to transform text to searchable value
protected TransformationProcessor,eZ\Publish\Core\Persistence $transformationProcessor
Результат eZ\Publish\Core\Persistence\TransformationProcessor

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

Need this for being able to pick fields that are searchable.
protected Handler,eZ\Publish\SPI\Persistence\Content\Type $typeHandler
Результат eZ\Publish\SPI\Persistence\Content\Type\Handler