2

Magento 2.4.1 I install elasticstuite on elasticsearch7

When I fire up a category, I get an error:

1 exception(s):
Exception #0 (LogicException): catalog_product index does not exist yet. Make sure everything is reindexed.

Exception #0 (LogicException): catalog_product index does not exist yet. Make sure everything is reindexed.
<pre>#1 Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\AttributeList->getMapping() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/AttributeList.php:127]
#2 Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\AttributeList->getAttributeCollection() called at [vendor/smile/elasticsuite/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php:109]
#3 Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product->l

What I do: restart elasticsearch bin/magento indexer:reset bin/magento indexer:reindex

Still the same issue. Can anyone have any solution?

2

4 Answers 4

6

Have you selected "Elasticsuite" as your search engine. Selecting "Elasticsearch 7" would give you this error enter image description here

1

As @Martin said you have to change the search engine.

The other way to change this is to put in app/etc/env.php

'system' => [
    'default' => [
        'catalog' => [
            'search' => [
                'engine' => 'elasticsuite'
            ]

And in magento 2.4.6, you may have to put:

        'smile_elasticsuite_core_base_settings' => [
            'es_client' => [
                'servers' => 'opensearch:9200',
                'enable_https_mode' => 0,
                'http_auth_user' => '',
                'http_auth_pwd' => '',
                'enable_http_auth' => false
            ]
        ]

In default.

And then:

bin/magento app:config:import
0

Perhaps helpful: if you do not change the search engine setting in Stores > Configuration > Catalog > Catalog Search then the catalog_product index will not be generated in ElasticSearch.

Source: https://github.com/Smile-SA/elasticsuite/issues/173#issuecomment-321014140

-1

Assuming, you want to use magento's built in 'elasticsearch7' support and NOT smile/elasticsuite ('ElasticSuite) as the search engine.

You can't have elasticsuite enabled if you're going to use Magento's 'elasticsearch7'...

Get a list of all elasticsuite modules, so you can disable all of them:

bin/magento module:status

bin/magento module:disable -c Smile_ElasticsuiteAdminNotification
bin/magento module:disable -c Smile_ElasticsuiteCore
bin/magento module:disable -c Smile_ElasticsuiteCatalog
bin/magento module:disable -c Smile_ElasticsuiteCatalogGraphQl
bin/magento module:disable -c Smile_ElasticsuiteCatalogRule
bin/magento module:disable -c Smile_ElasticsuiteCatalogOptimizer
bin/magento module:disable -c Smile_ElasticsuiteTracker
bin/magento module:disable -c Smile_ElasticsuiteThesaurus
bin/magento module:disable -c Smile_ElasticsuiteVirtualCategory
bin/magento module:disable -c Smile_ElasticsuiteSwatches
bin/magento module:disable -c Smile_ElasticsuiteIndices
bin/magento module:disable -c Smile_ElasticsuiteAnalytics
bin/magento module:disable -c Smile_ElasticsuiteRating

Refresh everything

bin/magento maintenance:enable 
bin/magento deploy:mode:set developer
rm -rf var/cache/*
rm -rf var/page_cache/*
rm -rf generated/code/*
bin/magento setup:upgrade
bin/magento setup:static-content:deploy -f
bin/magento indexer:reindex
find var generated vendor pub/static pub/media app/etc -type f -exec chmod u+w {} + && find var generated vendor pub/static pub/media app/etc -type d -exec chmod u+w {} + && chmod u+x bin/magento

bin/magento setup:di:compile
bin/magento cache:clean
find -exec chown USER:USER {} +

bin/magento deploy:mode:set production
# or
# bin/magento deploy:mode:set default

bin/magento maintenance:disable

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.