class StandardSearchIndexer implements SearchIndexerInterface (View source)

Properties

protected Connection $connection

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.

refreshRepositoryColumns(CategoryInterface $category, AttributeKeyInterface $key) deprecated

No description

bool
isValid(CategoryInterface $category)

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

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

in case of errors