elasticsuite: Exception: catalog_product index does not exist yet.
Hi Romain, thanks for introducing elasticsearch to me in the post https://github.com/magento/magento2/issues/7027. I think the elasticsuite is really greath and wanted to try it myself.
I´ve installed the ElasticSearch server as well as the magento module but getting the following errors on the frontend.
`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 #0 /var/www/diyparts.staging/diyparts_dev/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/AttributeList.php(166): Smile\ElasticsuiteCore\Index\IndexOperation->getIndexByName(‘catalog_product’, Object(Magento\Store\Model\Store\Interceptor)) #1 /var/www/diyparts.staging/diyparts_dev/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product/AttributeList.php(108): Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product\AttributeList->getMapping() #2 /var/www/diyparts.staging/diyparts_dev/vendor/smile/elasticsuite/src/module-elasticsuite-catalog-rule/Model/Rule/Condition/Product.php(77): Smile\ElasticsuiteCatalogRule\Model\Rule\Condition\Product`
Reindexing does not help, so I’ve no clue how to further go on. Maybe you know what to do. Installed Magento version: 2.1.0 using Elasticsuite version 2.2.0
I’ve updated to Magento version: 2.1.1 using Elasticsuite version 2.2.2 showing the same error.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 23 (4 by maintainers)
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.
as written before: https://github.com/Smile-SA/elasticsuite/issues/173#issuecomment-321014140
Run the index, while elasticsuite is selected in the backend.
This solution worked for me. Thank you.
Thanks for the tip @matheusgontijo To expand a bit for others with this issue, it can happen that some indexes don’t get rebuilt even if you do ‘bin/magento index:reindex’.
To know for sure, go into your database and run
select * from indexer_state, look at theupdatedcolumn.To force all indexes to be updated, run
update indexer_state set status = 'invalid'Then re-runbin/magento index:reindex.What about reindexinng did you run
bin/magento index:reindexas explained into the doc. if so, no errors ?Did you check ES server install requirement is OK as explained into : https://github.com/Smile-SA/elasticsuite/wiki/ServerConfig ?
In most cases solution provided from @amenk works great.
Another possible scenario is that the value for
statuscolumn fromindexer_statetable isworkingfor some (or many) indexes ascatalogsearch_fulltext.That was making the command
index:reindexSKIP that index. In other words, it was not processing that index due to a past interrupted command that never updated thestatusfromworkingtoinvalid.Make sure you set it as
invalid;- )catalog_product index does not exist yet. Make sure everything is reindexed
a:4:{i:0;s:75:“catalog_product index does not exist yet. Make sure everything is reindexed”;i:1;s:8304:“#0 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCore/Search/Request/ContainerConfiguration.php(161): Smile\ElasticsuiteCore\Index\IndexOperation->getIndexByName(‘catalog_product’, 1) #1 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCore/Search/Request/ContainerConfiguration.php(94): Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration->getIndex() #2 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCore/Search/Request/Builder.php(150): Smile\ElasticsuiteCore\Search\Request\ContainerConfiguration->getIndexName() #3 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection.php(583): Smile\ElasticsuiteCore\Search\Request\Builder->create(1, ‘catalog_view_co…’, 0, 0, NULL, Array, Array, Array, Array) #4 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection.php(189): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->loadProductCounts() #5 /Applications/AMPPS/www/testsssports/var/generation/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php(24): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->getSize() #6 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Data/Collection.php(259): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->getSize() #7 /Applications/AMPPS/www/testsssports/var/generation/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php(1610): Magento\Framework\Data\Collection->getLastPageNumber() #8 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Data/Collection.php(245): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->getLastPageNumber() #9 /Applications/AMPPS/www/testsssports/var/generation/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php(1597): Magento\Framework\Data\Collection->getCurPage(0) #10 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection.php(484): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->getCurPage() #11 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection.php(393): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->prepareRequest() #12 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Data/Collection/AbstractDb.php(338): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->_renderFiltersBefore() #13 /Applications/AMPPS/www/testsssports/app/code/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection.php(430): Magento\Framework\Data\Collection\AbstractDb->_renderFilters() #14 /Applications/AMPPS/www/testsssports/vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php(906): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection->_renderFilters() #15 /Applications/AMPPS/www/testsssports/vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php(727): Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false) #16 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Interceptor.php(146): Magento\Catalog\Model\ResourceModel\Product\Collection->load(false, false) #17 /Applications/AMPPS/www/testsssports/var/generation/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php(377): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->___callPlugins(‘load’, Array, Array) #18 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Data/Collection.php(820): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->load() #19 /Applications/AMPPS/www/testsssports/var/generation/Smile/ElasticsuiteCatalog/Model/ResourceModel/Product/Fulltext/Collection/Interceptor.php(1844): Magento\Framework\Data\Collection->getIterator() #20 /Applications/AMPPS/www/testsssports/vendor/magento/module-catalog/Block/Product/ListProduct.php(321): Smile\ElasticsuiteCatalog\Model\ResourceModel\Product\Fulltext\Collection\Interceptor->getIterator() #21 /Applications/AMPPS/www/testsssports/var/generation/Magento/Catalog/Block/Product/ListProduct/Interceptor.php(154): Magento\Catalog\Block\Product\ListProduct->getIdentities() #22 /Applications/AMPPS/www/testsssports/vendor/magento/module-page-cache/Model/Layout/LayoutPlugin.php(71): Magento\Catalog\Block\Product\ListProduct\Interceptor->getIdentities() #23 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Interceptor.php(152): Magento\PageCache\Model\Layout\LayoutPlugin->afterGetOutput(Object(Magento\Framework\View\Layout\Interceptor), ’ <script>\n …') #24 /Applications/AMPPS/www/testsssports/var/generation/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins(‘getOutput’, Array, Array) #25 /Applications/AMPPS/www/testsssports/vendor/magento/framework/View/Result/Page.php(243): Magento\Framework\View\Layout\Interceptor->getOutput() #26 /Applications/AMPPS/www/testsssports/vendor/magento/framework/View/Result/Layout.php(164): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor)) #27 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Interceptor.php(74): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor)) #28 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Chain/Chain.php(70): Magento\Framework\View\Result\Page\Interceptor->___callParent(‘renderResult’, Array) #29 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Chain/Chain.php(63): Magento\Framework\Interception\Chain\Chain->invokeNext(‘Magento\Framewo…’, ‘renderResult’, Object(Magento\Framework\View\Result\Page\Interceptor), Array, ‘result-varnish-…’) #30 /Applications/AMPPS/www/testsssports/vendor/magento/module-page-cache/Model/Controller/Result/VarnishPlugin.php(74): Magento\Framework\Interception\Chain\Chain->Magento\Framework\Interception\Chain{closure}(Object(Magento\Framework\App\Response\Http\Interceptor)) #31 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Chain/Chain.php(67): Magento\PageCache\Model\Controller\Result\VarnishPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor)) #32 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\Interception\Chain\Chain->invokeNext(‘Magento\Framewo…’, ‘renderResult’, Object(Magento\Framework\View\Result\Page\Interceptor), Array, ‘result-builtin-…’) #33 /Applications/AMPPS/www/testsssports/vendor/magento/module-page-cache/Model/Controller/Result/BuiltinPlugin.php(67): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception{closure}(Object(Magento\Framework\App\Response\Http\Interceptor)) #34 /Applications/AMPPS/www/testsssports/vendor/magento/framework/Interception/Interceptor.php(142): Magento\PageCache\Model\Controller\Result\BuiltinPlugin->aroundRenderResult(Object(Magento\Framework\View\Result\Page\Interceptor), Object(Closure), Object(Magento\Framework\App\Response\Http\Interceptor)) #35 /Applications/AMPPS/www/testsssports/var/generation/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins(‘renderResult’, Array, Array) #36 /Applications/AMPPS/www/testsssports/vendor/magento/framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor)) #37 /Applications/AMPPS/www/testsssports/vendor/magento/framework/App/Bootstrap.php(258): Magento\Framework\App\Http->launch() #38 /Applications/AMPPS/www/testsssports/index.php(39): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http)) #39 {main}”;s:3:“url”;s:31:“/testsssports/men/tops-men.html”;s:11:“script_name”;s:23:“/testsssports/index.php”;}
Can anyone help please.
ElasticSearch => 2.4.6 ElasticSuite => ElasticSuite 2.3.10 Magento EE => 2.1.x
Please reply ASAP
maybe you could give a try to removing Smile_* entries from the setup_module then process again a setup:upgrade. Or now that you have everything running fines regarding ES plugins, try a reinstall from scratch.
Regards.