Shopware 6 Data Abstraction Layer (DAL) Indexing Explain

Dragan Rapić
Level Up Coding
Published in
4 min readFeb 5, 2024

Photo by Sebastian Svenson on Unsplash

Let’s start with an official Shopware documentation explanation:

Data records are read way more often than they are written. Therefore it is worthwhile to spend a little more time on the writing process in order to minimize the effort required for the reading process. This is done in the DAL via the Entity Indexer pattern. As soon as a product record is written, the corresponding Product Indexer is triggered, which pre-selects certain aggregations and writes them away optimized for the later reading process.

Let's put it short, to speed up the shop site, the background actions are required. These actions are done asynchronously i.e. in the background of the show and it calls DAL Indexing.

What does DAL Indexing do?

It depends on the entity. Most action happens on the product entity, like calculation of the stock, cheapest price, seo_url, etc.

All entities have an Indexer class, that determines what needs to be done. For example:

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

Sherlock of programing problems, Father of Two & Head of Engineering @ Revendo