PHP Class eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase

Inheritance: extends eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway
Afficher le fichier Open project: ezsystems/ezpublish-kernel

Protected Properties

Свойство Type Description
$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.

Méthodes publiques

Méthode Description
__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.

Private Methods

Méthode Description
buildWordIDArray ( array $indexArrayOnlyWords ) : array Build WordIDArray and update ezsearch_word table.
indexWords ( FullTextData $fullTextData, array $indexArray, array $wordIDArray, integer $placement ) : integer Index wordIndex.

Method Details

__construct() public méthode

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() public méthode

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() public méthode

Ported from the legacy code
See also: 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() public méthode

Remove entire search index.
public purgeIndex ( )

remove() public méthode

Ported from the legacy code
See also: 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
Résultat boolean

Property Details

$dbHandler protected_oe property

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

$fullTextSearchConfiguration protected_oe property

Full text search configuration options.
protected array $fullTextSearchConfiguration
Résultat array

$searchIndex protected_oe property

Need this for queries on ezsearch* tables
protected SearchIndex,eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository $searchIndex
Résultat eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex

$transformationProcessor protected_oe property

Need this for being able to transform text to searchable value
protected TransformationProcessor,eZ\Publish\Core\Persistence $transformationProcessor
Résultat eZ\Publish\Core\Persistence\TransformationProcessor

$typeHandler protected_oe property

Need this for being able to pick fields that are searchable.
protected Handler,eZ\Publish\SPI\Persistence\Content\Type $typeHandler
Résultat eZ\Publish\SPI\Persistence\Content\Type\Handler