Class

eZ\Publish\Core\Search\Common\IncrementalIndexer

abstract class IncrementalIndexer extends Indexer

Base class for the Search Engine Indexer Service aimed to recreate Search Engine Index.

Each Search Engine has to extend it on its own.

Extends indexer to allow for reindexing your install while it is in production by splitting indexing into tree tasks: - Remove items in index no longer valid in database - Making purge of index optional - indexing by specifying id's, for purpose of supporting parallel indexing

Constants

CONTENTOBJECT_TABLE

CONTENTOBJECT_TREE_TABLE

Methods

__construct(LoggerInterface $logger, Handler $persistenceHandler, DatabaseHandler $databaseHandler, Handler $searchHandler)

from Indexer
createSearchIndex(OutputInterface $output, int $iterationCount, bool $commit)

updateSearchIndex(array $contentIds, bool $commit)

Updates search engine index based on Content id's.

purge()

Purges whole index, should only be done if user asked for it.

string getName()

Return human readable name of given search engine (and if custom indexer you can append that to).

Details

in Indexer at line 49
public __construct(LoggerInterface $logger, Handler $persistenceHandler, DatabaseHandler $databaseHandler, Handler $searchHandler)

Parameters

LoggerInterface $logger
Handler $persistenceHandler
DatabaseHandler $databaseHandler
Handler $searchHandler

at line 31
final public createSearchIndex(OutputInterface $output, int $iterationCount, bool $commit)

Parameters

OutputInterface $output
int $iterationCount
bool $commit commit changes after each iteration

at line 77
abstract public updateSearchIndex(array $contentIds, bool $commit)

Updates search engine index based on Content id's.

If content is: - deleted (NotFoundException) - not published (draft or trashed) Then item is removed from index, if not it is added/updated.

Parameters

array $contentIds
bool $commit

at line 82
abstract public purge()

Purges whole index, should only be done if user asked for it.

at line 89
abstract public string getName()

Return human readable name of given search engine (and if custom indexer you can append that to).

Return Value

string