class ExpressSearchIndexer extends StandardSearchIndexer (View source)

Properties

protected Connection $connection from  StandardSearchIndexer

Methods

__construct(Connection $connection)

Initialize the instance.

indexEntry(CategoryInterface $category, AttributeValueInterface $value, object $subject)

Store in the index table the value of an attribute of an item.

clearIndexEntry(CategoryInterface $category, AttributeValueInterface $value, object $subject)

Remove from the index table the value of an attribute of an item.

createRepository(CategoryInterface $category)

Create the database table where the data of the indexed attributes will be stored.

updateRepositoryColumns(CategoryInterface $category, AttributeKeyInterface $key, string|null $previousHandle = null)

Create or update the column that contains the indexed data of a specific attribute.

bool
isValid(CategoryInterface $category)

Check if a category is correctly configured to handle indexing stuff.

updateRepository(Entity $previousEntity, Entity $newEntity)

Update (if needed) the name of the index table ater the express entity changed (for example because its handle changed).

Details

__construct(Connection $connection)

Initialize the instance.

Parameters

Connection $connection

indexEntry(CategoryInterface $category, AttributeValueInterface $value, object $subject)

Store in the index table the value of an attribute of an item.

Parameters

CategoryInterface $category
AttributeValueInterface $value
object $subject

The item owning the attribute value

See also

SearchIndexerInterface::indexEntry

clearIndexEntry(CategoryInterface $category, AttributeValueInterface $value, object $subject)

Remove from the index table the value of an attribute of an item.

Parameters

CategoryInterface $category
AttributeValueInterface $value
object $subject

The item owning the attribute value

See also

SearchIndexerInterface::clearIndexEntry

createRepository(CategoryInterface $category)

Create the database table where the data of the indexed attributes will be stored.

updateRepositoryColumns(CategoryInterface $category, AttributeKeyInterface $key, string|null $previousHandle = null)

Create or update the column that contains the indexed data of a specific attribute.

Parameters

CategoryInterface $category
AttributeKeyInterface $key
string|null $previousHandle

See also

SearchIndexerInterface::updateRepositoryColumns

refreshRepositoryColumns(CategoryInterface $category, AttributeKeyInterface $key) deprecated

deprecated use the updateRepositoryColumns() method

No description

Parameters

CategoryInterface $category
AttributeKeyInterface $key

protected bool isValid(CategoryInterface $category)

Check if a category is correctly configured to handle indexing stuff.

Parameters

CategoryInterface $category

Return Value

bool

Exceptions

Exception

updateRepository(Entity $previousEntity, Entity $newEntity)

Update (if needed) the name of the index table ater the express entity changed (for example because its handle changed).

Parameters

Entity $previousEntity
Entity $newEntity