Problems when switching to Elasticsearch

Hi.
First … many thanks to Craig 4 Magento 2.3.1 install tutorial !
I install elasticsearch on server and configure Magento Admin to use Elasticsearch instead MySQL.
I install (10x to Craig tutorial) the demo store.
When i try to navigate on demo site I receive the below error:
Home page and admin are working fine but they are loading painfully slow (instalation it on a virtual machine with 4xCPU and 8GB RAM alocated.

After i switch back to MySQL … it work fine.

Any idea what’s happen?!
I am not a full tech person …

I appreciate any help.
Fabian

http://localhost/men/tops-men/jackets-men.html

1 exception(s):
Exception #0 (Exception): Notice: Undefined index: manufacturer_bucket in /var/www/html/vendor/magento/module-elasticsearch/SearchAdapter/Aggregation/Builder/Term.php on line 26

Exception #0 (Exception): Notice: Undefined index: manufacturer_bucket in /var/www/html/vendor/magento/module-elasticsearch/SearchAdapter/Aggregation/Builder/Term.php on line 26
#1 Magento\Elasticsearch\SearchAdapter\Aggregation\Builder\Term->build(&Magento\Framework\Search\Request\Aggregation\TermBucket#000000006df17eb80000000003da672b#, array('scope' => &Magento\Framework\Search\Request\Dimension#000000006df17eb90000000003da672b#), array('hits' => array('hits' => array()), 'aggregations' => array('price_bucket' => array(), 'category_bucket' => array('buckets' => array()))), &Magento\Elasticsearch\SearchAdapter\Dynamic\DataProvider#000000006df173970000000003da672b#) called at [vendor/magento/module-elasticsearch/SearchAdapter/Aggregation/Builder.php:90]
#2 Magento\Elasticsearch\SearchAdapter\Aggregation\Builder->build(&Magento\Framework\Search\Request#000000006df17e0f0000000003da672b#, array('hits' => array('hits' => array()), 'aggregations' => array('price_bucket' => array(), 'category_bucket' => array('buckets' => array())))) called at [vendor/magento/module-elasticsearch/Elasticsearch5/SearchAdapter/Adapter.php:127]
#3 Magento\Elasticsearch\Elasticsearch5\SearchAdapter\Adapter->query(&Magento\Framework\Search\Request#000000006df17e0f0000000003da672b#) called at [vendor/magento/module-search/Model/SearchEngine.php:42]
#4 Magento\Search\Model\SearchEngine->search(&Magento\Framework\Search\Request#000000006df17e0f0000000003da672b#) called at [vendor/magento/framework/Search/Search.php:72]
#5 Magento\Framework\Search\Search->search(&Magento\Framework\Api\Search\SearchCriteria#000000006df17e180000000003da672b#) called at [vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php:359]
#6 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection->_renderFiltersBefore() called at [vendor/magento/framework/Data/Collection/AbstractDb.php:342]
#7 Magento\Framework\Data\Collection\AbstractDb->_renderFilters() called at [vendor/magento/module-catalog-search/Model/ResourceModel/Fulltext/Collection.php:410]
#8 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection->_renderFilters() called at [vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:920]
#9 Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false) called at [vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:799]
#10 Magento\Catalog\Model\ResourceModel\Product\Collection->load(false, false) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#11 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor->___callParent('load', array(false, false)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#12 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#13 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor->___callPlugins('load', array(), array(array('add_stock_inform...'))) called at [generated/code/Magento/CatalogSearch/Model/ResourceModel/Fulltext/Collection/Interceptor.php:325]
#14 Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor->load() called at [vendor/magento/module-review/Observer/CatalogBlockProductCollectionBeforeToHtmlObserver.php:38]
#15 Magento\Review\Observer\CatalogBlockProductCollectionBeforeToHtmlObserver->execute(&Magento\Framework\Event\Observer#000000006df17e060000000003da672b#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:72]
#16 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(&Magento\Review\Observer\CatalogBlockProductCollectionBeforeToHtmlObserver#000000006df17e520000000003da672b#, &Magento\Framework\Event\Observer#000000006df17e060000000003da672b#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:60]
#17 Magento\Framework\Event\Invoker\InvokerDefault->dispatch(array('instance' => 'Magento\Review\O...', 'shared' => false, 'name' => 'review'), &Magento\Framework\Event\Observer#000000006df17e060000000003da672b#) called at [vendor/magento/framework/Event/Manager.php:66]
#18 Magento\Framework\Event\Manager->dispatch('catalog_block_pr...', array('collection' => &Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor#000000006df17f9a0000000003da672b#)) called at [generated/code/Magento/Framework/Event/Manager/Proxy.php:95]
#19 Magento\Framework\Event\Manager\Proxy->dispatch('catalog_block_pr...', array('collection' => &Magento\CatalogSearch\Model\ResourceModel\Fulltext\Collection\Interceptor#000000006df17f9a0000000003da672b#)) called at [vendor/magento/module-catalog/Block/Product/ListProduct.php:471]
#20 Magento\Catalog\Block\Product\ListProduct->initializeProductCollection() called at [vendor/magento/module-catalog/Block/Product/ListProduct.php:116]
#21 Magento\Catalog\Block\Product\ListProduct->_getProductCollection() called at [vendor/magento/module-catalog/Block/Product/ListProduct.php:187]
#22 Magento\Catalog\Block\Product\ListProduct->_beforeToHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:667]
#23 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor.php:882]
#24 Magento\Catalog\Block\Product\ListProduct\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#25 Magento\Framework\View\Layout->_renderBlock('category.product...') called at [vendor/magento/framework/View/Layout.php:533]
#26 Magento\Framework\View\Layout->renderNonCachedElement('category.product...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#27 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('category.product...') called at [vendor/magento/framework/View/Layout.php:488]
#28 Magento\Framework\View\Layout->renderElement('category.product...', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#29 Magento\Framework\View\Layout\Interceptor->renderElement('category.product...', true) called at [vendor/magento/framework/View/Element/AbstractBlock.php:508]
#30 Magento\Framework\View\Element\AbstractBlock->getChildHtml('product_list') called at [vendor/magento/module-catalog/Block/Category/View.php:100]
#31 Magento\Catalog\Block\Category\View->getProductListHtml() called at [vendor/magento/module-catalog/view/frontend/templates/category/products.phtml:18]
#32 include('/var/www/html/ve...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#33 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Catalog\Block\Category\View#000000006df1716b0000000003da672b#, '/var/www/html/ve...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#34 Magento\Framework\View\Element\Template->fetchView('/var/www/html/ve...') called at [vendor/magento/framework/View/Element/Template.php:301]
#35 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:668]
#36 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#37 Magento\Framework\View\Layout->_renderBlock('category.product...') called at [vendor/magento/framework/View/Layout.php:533]
#38 Magento\Framework\View\Layout->renderNonCachedElement('category.product...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#39 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('category.product...') called at [vendor/magento/framework/View/Layout.php:488]
#40 Magento\Framework\View\Layout->renderElement('category.product...', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#41 Magento\Framework\View\Layout\Interceptor->renderElement('category.product...', false) called at [vendor/magento/framework/View/Layout.php:585]
#42 Magento\Framework\View\Layout->_renderContainer('content', false) called at [vendor/magento/framework/View/Layout.php:535]
#43 Magento\Framework\View\Layout->renderNonCachedElement('content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#44 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('content') called at [vendor/magento/framework/View/Layout.php:488]
#45 Magento\Framework\View\Layout->renderElement('content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#46 Magento\Framework\View\Layout\Interceptor->renderElement('content', false) called at [vendor/magento/framework/View/Layout.php:585]
#47 Magento\Framework\View\Layout->_renderContainer('main', false) called at [vendor/magento/framework/View/Layout.php:535]
#48 Magento\Framework\View\Layout->renderNonCachedElement('main') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#49 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main') called at [vendor/magento/framework/View/Layout.php:488]
#50 Magento\Framework\View\Layout->renderElement('main', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#51 Magento\Framework\View\Layout\Interceptor->renderElement('main', false) called at [vendor/magento/framework/View/Layout.php:585]
#52 Magento\Framework\View\Layout->_renderContainer('columns', false) called at [vendor/magento/framework/View/Layout.php:535]
#53 Magento\Framework\View\Layout->renderNonCachedElement('columns') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#54 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('columns') called at [vendor/magento/framework/View/Layout.php:488]
#55 Magento\Framework\View\Layout->renderElement('columns', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#56 Magento\Framework\View\Layout\Interceptor->renderElement('columns', false) called at [vendor/magento/framework/View/Layout.php:585]
#57 Magento\Framework\View\Layout->_renderContainer('main.content', false) called at [vendor/magento/framework/View/Layout.php:535]
#58 Magento\Framework\View\Layout->renderNonCachedElement('main.content') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#59 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('main.content') called at [vendor/magento/framework/View/Layout.php:488]
#60 Magento\Framework\View\Layout->renderElement('main.content', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#61 Magento\Framework\View\Layout\Interceptor->renderElement('main.content', false) called at [vendor/magento/framework/View/Layout.php:585]
#62 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#63 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#64 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#65 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#66 Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#67 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:535]
#68 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#69 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:488]
#70 Magento\Framework\View\Layout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#71 Magento\Framework\View\Layout\Interceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:954]
#72 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#73 Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#74 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#75 Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#76 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#77 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#000000006df176300000000003da672b#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#78 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000006df176300000000003da672b#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#79 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000006df176300000000003da672b#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#80 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#000000006df176300000000003da672b#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#81 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#000000006df176300000000003da672b#), array(array('result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#82 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#000000006df176300000000003da672b#) called at [vendor/magento/framework/App/Http.php:140]
#83 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#84 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#85 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#000000006df176320000000003da672b#) called at [index.php:39]

Hi @fabiancj and welcome.

I’ve not had the opportunity to try Elasticsearch yet, so I have zero experience with it just yet. Here are are some leads you might want to try:

  • Everything is slow: Re-nable your cache
  • This article seems to have the same issue as you. I don’t think it’s anything you’ve done wrong, so that’s good :+1: Instead, it looks like a theme incompatibility. So, try switching to the Luma (default theme) to verify if that is the case. If it is, then you’ll need to reach out to either the Theme or Extension provider for a custom patch.

Hi and 10x for your reply.

  1. Regarding elasticsearch … i wait for some stronger documentation … :slight_smile:

  2. Regarding painfully slow page loading i found two complementary solutions:
    In Chapter 6: Bonus – Install Sample Data we switch to developer mode.
    Simply switching to production mode increase the pageload speed a lot
    #bin/magento deploy:mode:set production
    … and enabling all cache was the second:
    #php bin/magento cache:enable

Great forum.
Waiting for an elasticsearch video :slight_smile:

Fabian