Smile\ElasticsuiteCatalog\Setup\UpgradeData::updateCategorySearchableAttributes PHP Метод

updateCategorySearchableAttributes() приватный Метод

Basically : - Name (indexable and searchable - Description (indexable and searchable) - Url Path (indexable)
    private function updateCategorySearchableAttributes()
    {
        $setup = $this->eavSetup->getSetup();
        $connection = $setup->getConnection();
        $table = $setup->getTable('catalog_eav_attribute');
        // Set Name and description indexable and searchable.
        $attributeIds = [$this->eavSetup->getAttributeId(\Magento\Catalog\Model\Category::ENTITY, 'name'), $this->eavSetup->getAttributeId(\Magento\Catalog\Model\Category::ENTITY, 'description')];
        foreach (['is_searchable', 'is_used_in_spellcheck'] as $configField) {
            foreach ($attributeIds as $attributeId) {
                $connection->update($table, [$configField => 1], $connection->quoteInto('attribute_id = ?', $attributeId));
            }
        }
        // Set url_path indexable.
        $urlPathAttributeId = $this->eavSetup->getAttributeId(\Magento\Catalog\Model\Category::ENTITY, 'url_path');
        $connection->update($table, ['is_searchable' => 1], $connection->quoteInto('attribute_id = ?', $urlPathAttributeId));
    }