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

Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase Class Reference

WordIndexer gateway implementation using the Doctrine database. More...

Inheritance diagram for eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase:

## Public Member Functions
| __construct (DatabaseHandler $dbHandler, SPITypeHandler $typeHandler, TransformationProcessor $transformationProcessor, SearchIndex $searchIndex, MaskGenerator $languageMaskGenerator, array $fullTextSearchConfiguration)
| Construct from handler handler. More...
| bulkIndex (array $fullTextBulkData)
| Indexes an array of FullTextData objects. More...
| remove ($contentId, $versionId=null)
| Remove whole content or a specific version from index. More...
| purgeIndex ()
| Remove entire search index. More...
Public Member Functions inherited from eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway
| index (FullTextData $fullTextValue)
| Index search engine FullTextData objects corresponding to content object field values. More...

## Public Attributes
const | DB_INT_MAX = 2147483647
| Max acceptable by any DBMS INT value. More...

## Protected Attributes
| $dbHandler
| $typeHandler
| $transformationProcessor
| $searchIndex
| $fullTextSearchConfiguration

## Private Member Functions
| indexWords (FullTextData $fullTextData, array $indexArray, array $wordIDArray, $placement=0)
| Index wordIndex. More...
| buildWordIDArray (array $indexArrayOnlyWords)
| Build WordIDArray and update ezsearch_word table. More...

## Private Attributes
| $languageMaskGenerator

## Detailed Description

WordIndexer gateway implementation using the Doctrine database.

Definition at line 22 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::__construct | ( | DatabaseHandler | $dbHandler,
|  | SPITypeHandler | $typeHandler,
|  | TransformationProcessor | $transformationProcessor,
|  | SearchIndex | $searchIndex,
|  | MaskGenerator | $languageMaskGenerator,
|  | array | $fullTextSearchConfiguration
| ) |  |

Construct from handler handler.

Parameters

  \eZ\Publish\Core\Persistence\Database\DatabaseHandler | $dbHandler |
  \eZ\Publish\SPI\Persistence\Content\Type\Handler | $typeHandler |
  \eZ\Publish\Core\Persistence\TransformationProcessor | $transformationProcessor |
  \eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Repository\SearchIndex | $searchIndex |
  \eZ\Publish\Core\Persistence\Legacy\Content\Language\MaskGenerator | $languageMaskGenerator |
  array | $fullTextSearchConfiguration |

Definition at line 87 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

References eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\$dbHandler, eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\$fullTextSearchConfiguration, eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\$languageMaskGenerator, eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\$searchIndex, eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\$transformationProcessor, and eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\$typeHandler.

## Member Function Documentation

## ◆ buildWordIDArray()

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::buildWordIDArray | ( | array | $indexArrayOnlyWords | ) |
| private

Build WordIDArray and update ezsearch_word table.

Ported from the legacy code

See also
  https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L155

Parameters

  array | $indexArrayOnlyWords | words for object to add

Returns
  array wordIDArray

Definition at line 319 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

## ◆ bulkIndex()

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::bulkIndex | ( | array | $fullTextBulkData | ) |

Indexes an array of FullTextData objects.

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.

Parameters

  \eZ\Publish\Core\Search\Legacy\Content\FullTextData[] | $fullTextBulkData |

Reimplemented from eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway.

Definition at line 198 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

References eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\index().

## ◆ indexWords()

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::indexWords | ( | FullTextData | $fullTextData,
|  | array | $indexArray,
|  | array | $wordIDArray,
|  |  | $placement = `0`
| ) |  |
| private

Index wordIndex.

Ported from the legacy code

See also
  https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L255

Parameters

  \eZ\Publish\Core\Search\Legacy\Content\FullTextData | $fullTextData |
  array | $indexArray |
  array | $wordIDArray |
  int | $placement |

Returns
  int last placement

Definition at line 258 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

## ◆ purgeIndex()

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::purgeIndex | ( |  | ) |

Remove entire search index.

Reimplemented from eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway.

Definition at line 239 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

## ◆ remove()

eZ\Publish\Core\Persistence\Legacy\Content\UrlAlias\Gateway\DoctrineDatabase::remove | ( |  | $action,
|  |  | $id = `null`
| ) |  |

Remove whole content or a specific version from index.

Deletes all rows with given $action and optionally $id.

Ported from the legacy code

See also
  https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/search/plugins/ezsearchengine/ezsearchengine.php#L386

Parameters

  mixed | $contentId |
  mixed | null | $versionId |

Returns
  bool

If $id is set only autogenerated entries will be removed.

Parameters

  mixed | $action |
  mixed | null | $id |

Returns
  bool

Reimplemented from eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway.

Definition at line 217 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

## Member Data Documentation

## ◆ $dbHandler

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::$dbHandler
| protected

Definition at line 38 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

Referenced by eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\__construct().

## ◆ $fullTextSearchConfiguration

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::$fullTextSearchConfiguration
| protected

Definition at line 75 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

Referenced by eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\__construct().

## ◆ $languageMaskGenerator

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::$languageMaskGenerator
| private

Definition at line 68 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

Referenced by eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\__construct().

## ◆ $searchIndex

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::$searchIndex
| protected

Definition at line 65 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

Referenced by eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\__construct().

## ◆ $transformationProcessor

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::$transformationProcessor
| protected

Definition at line 56 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

Referenced by eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\__construct().

## ◆ $typeHandler

eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::$typeHandler
| protected

Definition at line 47 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

Referenced by eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase\__construct().

## ◆ DB_INT_MAX

const eZ\Publish\Core\Search\Legacy\Content\WordIndexer\Gateway\DoctrineDatabase::DB_INT_MAX = 2147483647

Max acceptable by any DBMS INT value.

Note: 2^31-1 seems to be the most reasonable value that should work in any setup.

Definition at line 29 of file Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php.

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

- Search/Legacy/Content/WordIndexer/Gateway/DoctrineDatabase.php

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