Exponential 5.x Kernel 7.5.40 Exponential New Stack (Symfony-based) Kernel — PHP Class Reference

Public Member Functions | List of all members
eZ\Publish\Core\Search\Common\IncrementalIndexer Class Reference

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

Inheritance diagram for eZ\Publish\Core\Search\Common\IncrementalIndexer:

## Public Member Functions
| createSearchIndex (OutputInterface $output, $iterationCount, $commit)
| updateSearchIndex (array $contentIds, $commit)
| Updates search engine index based on Content id's. More...
| purge ()
| Purges whole index, should only be done if user asked for it. More...
| getName ()
| Return human readable name of given search engine (and if custom indexer you can append that to). More...
Public Member Functions inherited from eZ\Publish\Core\Search\Common\Indexer
| __construct (LoggerInterface $logger, PersistenceHandler $persistenceHandler, DatabaseHandler $databaseHandler, SearchHandler $searchHandler)

## Additional Inherited Members
Public Attributes inherited from eZ\Publish\Core\Search\Common\Indexer
const | CONTENTOBJECT_TABLE = 'ezcontentobject'
const | CONTENTOBJECT_TREE_TABLE = 'ezcontentobject_tree'
Protected Member Functions inherited from eZ\Publish\Core\Search\Common\Indexer
| getContentDbFieldsStmt (array $fields)
| Get PDOStatement to fetch metadata about content objects to be indexed. More...
| getContentLocationIds ($contentObjectId)
| Fetch location Ids for the given content object. More...
| logWarning (ProgressBar $progress, $message)
| Log warning while progress bar is shown. More...
Protected Attributes inherited from eZ\Publish\Core\Search\Common\Indexer
| $logger
| $persistenceHandler
| $databaseHandler
| $searchHandler

## Detailed Description

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

@api

Definition at line 24 of file IncrementalIndexer.php.

## Member Function Documentation

## ◆ createSearchIndex()

eZ\Publish\Core\Search\Common\IncrementalIndexer::createSearchIndex | ( | OutputInterface | $output,
|  |  | $iterationCount,
|  |  | $commit
| ) |  |
| final

Deprecated:
  Kept for compatibility with consumers of Indexer, performs purge first & recreate of index second.

Reimplemented from eZ\Publish\Core\Search\Common\Indexer.

Definition at line 29 of file IncrementalIndexer.php.

References eZ\Publish\Core\Search\Common\Indexer\getContentDbFieldsStmt(), eZ\Publish\Core\Search\Common\IncrementalIndexer\getName(), and eZ\Publish\Core\Search\Common\IncrementalIndexer\updateSearchIndex().

## ◆ getName()

eZ\Publish\Core\Search\Common\IncrementalIndexer::getName | ( |  | ) |
| abstract

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

Returns
  string

Reimplemented in eZ\Publish\Core\Search\Legacy\Content\Indexer.

Referenced by eZ\Publish\Core\Search\Common\IncrementalIndexer\createSearchIndex().

## ◆ purge()

eZ\Publish\Core\Search\Common\IncrementalIndexer::purge | ( |  | ) |
| abstract

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

Reimplemented in eZ\Publish\Core\Search\Legacy\Content\Indexer.

## ◆ updateSearchIndex()

eZ\Publish\Core\Search\Common\IncrementalIndexer::updateSearchIndex | ( | array | $contentIds,
|  |  | $commit
| ) |  |
| abstract

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.

If generic unhandled exception is thrown, then item indexing is skipped and warning is logged.

Parameters

  int[] | $contentIds |
  bool | $commit |

Reimplemented in eZ\Publish\Core\Search\Legacy\Content\Indexer.

Referenced by eZ\Publish\Core\Search\Common\IncrementalIndexer\createSearchIndex().

The documentation for this class was generated from the following file:

- IncrementalIndexer.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.