Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-catalog/etc/mview.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!--
/**
 * Smile_ElasticsuiteCatalog Mview Configuration.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
 * versions in the future.
 *
 * @category  Smile
 * @package   Smile\ElasticsuiteCatalog
 * @author    Romain Ruaud <romain.ruaud@smile.fr>
 * @copyright 2020 Smile
 * @license   Open Software License ("OSL") v. 3.0
 */
 -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Mview/etc/mview.xsd">
    <view id="catalogsearch_fulltext" class="\Magento\CatalogSearch\Model\Indexer\Mview\Action" group="indexer">
        <subscriptions>
            <!-- This subscription aims to reindex products after their category is modified -->
            <table name="catalog_category_product" entity_column="product_id" />
            <!-- This subscription aims to reindex products modified in the search terms merchandiser -->
            <table name="smile_elasticsuitecatalog_search_query_product_position" entity_column="product_id" />
        </subscriptions>
    </view>
    <view id="elasticsuite_categories_fulltext" class="Smile\ElasticsuiteCatalog\Model\Category\Indexer\Fulltext" group="indexer">
        <subscriptions>
            <table name="catalog_category_entity" entity_column="entity_id" />
            <table name="catalog_category_entity_datetime" entity_column="entity_id" />
            <table name="catalog_category_entity_decimal" entity_column="entity_id" />
            <table name="catalog_category_entity_int" entity_column="entity_id" />
            <table name="catalog_category_entity_text" entity_column="entity_id" />
            <table name="catalog_category_entity_varchar" entity_column="entity_id" />
        </subscriptions>
    </view>
</config>