I've read the documentation about indexing in Magento 2, but it's very much on the surface. What I am wondering is how do the internals of the indexing mechanism work. Can somebody explain this to me? If I look for example at the Category/Product relation I can determine the following:
The following tables are involved in my setup:
So far, I understand the following about the indexing process:
- Category/Product relations are stored in
- Whenever the is a change to this relation, a new version is pushed to the changelog (
catalog_category_product_cl) to be picked up by the Materialized View implementation by comparing versions in the
catalog_category_product_index_tmpis populated during indexing and swapped at the end the process with
But here are my questions I still have left:
- What is the purpose of the
- Why are there indexes per store even though the
- Not sure if this is a bug, but why are there differences between the products in
catalog_category_product_index_store1? To clarify: In
catalog_category_product_indexI have a product that is assigned to 6 category ID's, whereas the same product in the dedicated
_store1-index is only assigned to 4 category ID's. Could be a bug though.
Any help/explanation from core Magento developers or more experienced Magento developers is appreciated.