0

Hoping someone can help. I'm running Magento 2.4.1, PHP 7.4 with Elasticsearch 7.10.2. I was using Mageplaza layered nav, but turned this off. Using Porto theme and a few other extensions which shouldn't really affect search, but I can list these if necessary.

When I search something like "Puma" it brings up the results, albeit slow. When I search for something like 'shorts' or 't-shirt' it throws error 500 Site can't be reached ERR_INVALID_RESPONSE.

I do have an attribute named 'product type' but I've even gone as far as to delete this attribute and reindex but the error still occurs.

The error below from the log is the only Elasticsearch one I can see, but as the times are not relating to when I'm testing, I'm unsure if it's related

[2021-03-20 12:31:55] main.CRITICAL: {"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: For input string: "72///"","index_uuid":"-yXdXNpYRSm4GtHCw98vMg","index":"motif_product_1_v70"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"motif_product_1_v70","node":"gZY3g9o5RfWqqVbv2QmNlA","reason":{"type":"query_shard_exception","reason":"failed to create query: For input string: "72///"","index_uuid":"-yXdXNpYRSm4GtHCw98vMg","index":"motif_product_1_v70","caused_by":{"type":"number_format_exception","reason":"For input string: "72///""}}}]},"status":400} {"exception":"[object] (Elasticsearch\Common\Exceptions\BadRequest400Exception(code: 400): {"error":{"root_cause":[{"type":"query_shard_exception","reason":"failed to create query: For input string: \"72///\"","index_uuid":"-yXdXNpYRSm4GtHCw98vMg","index":"motif_product_1_v70"}],"type":"search_phase_execution_exception","reason":"all shards failed","phase":"query","grouped":true,"failed_shards":[{"shard":0,"index":"motif_product_1_v70","node":"gZY3g9o5RfWqqVbv2QmNlA","reason":{"type":"query_shard_exception","reason":"failed to create query: For input string: \"72///\"","index_uuid":"-yXdXNpYRSm4GtHCw98vMg","index":"motif_product_1_v70","caused_by":{"type":"number_format_exception","reason":"For input string: \"72///\""}}}]},"status":400} at /var/www/vhosts/motif8.co.uk/httpdocs/vendor/elasticsearch/elasticsearch/src/Elasticsearch/Connections/Connection.php:632)"} []

As an update, I've set it to show errors, now the following shows. I have uninstalled Mageplaza Layered Nav but still get this:

1 exception(s): Exception #0 (Magento\Framework\Exception\LocalizedException): Sorry, something went wrong. You can find out more in the error log.

Exception #0 (Magento\Framework\Exception\LocalizedException): Sorry, something went wrong. You can find out more in the error log.

#1 Magento\Framework\Data\Collection\AbstractDb->_renderFilters() called at [app/code/Mageplaza/LayeredNavigation/Model/ResourceModel/Fulltext/Collection.php:519]
#2 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection->_renderFilters() called at [vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:923]
#3 Magento\Eav\Model\Entity\Collection\AbstractCollection->load() called at [vendor/magento/module-catalog/Model/ResourceModel/Product/Collection.php:832]
#4 Magento\Catalog\Model\ResourceModel\Product\Collection->load() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#5 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#6 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#7 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor->___callPlugins() called at [generated/code/Mageplaza/LayeredNavigation/Model/ResourceModel/Fulltext/Collection/Interceptor.php:302]
#8 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor->load() called at [vendor/magento/framework/Data/Collection.php:839]
#9 Magento\Framework\Data\Collection->getIterator() called at [generated/code/Mageplaza/LayeredNavigation/Model/ResourceModel/Fulltext/Collection/Interceptor.php:1355]
#10 Mageplaza\LayeredNavigation\Model\ResourceModel\Fulltext\Collection\Interceptor->getIterator() called at [vendor/magento/module-catalog/Block/Product/ListProduct.php:147]
#11 Magento\Catalog\Block\Product\ListProduct->getLoadedProductCollection() called at [generated/code/Magento/Catalog/Block/Product/ListProduct/Interceptor.php:32]
#12 Magento\Catalog\Block\Product\ListProduct\Interceptor->getLoadedProductCollection() called at [vendor/magento/module-catalog-search/Block/Result.php:182]
#13 Magento\CatalogSearch\Block\Result->_getProductCollection() called at [vendor/magento/module-catalog-search/Block/Result.php:206]
#14 Magento\CatalogSearch\Block\Result->getResultCount() called at [app/design/frontend/Smartwave/porto/Magento_CatalogSearch/templates/result.phtml:10]
#15 include('/var/www/vhosts/...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#16 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#17 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#18 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#19 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:23]
#20 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#21 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#22 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#23 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#24 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#25 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#26 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:542]
#27 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#28 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#29 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#30 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Element/AbstractBlock.php:526]
#31 Magento\Framework\View\Element\AbstractBlock->getChildHtml() called at [app/code/Mageplaza/AjaxLayer/view/frontend/templates/products.phtml:24]
#32 include('/var/www/vhosts/...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:71]
#33 Magento\Framework\View\TemplateEngine\Php->render() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#34 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#35 Magento\Framework\View\TemplateEngine\Php\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#36 Magento\Framework\View\TemplateEngine\Php\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/TemplateEngine/Php/Interceptor.php:23]
#37 Magento\Framework\View\TemplateEngine\Php\Interceptor->render() called at [vendor/magento/framework/View/Element/Template.php:273]
#38 Magento\Framework\View\Element\Template->fetchView() called at [vendor/magento/framework/View/Element/Template.php:303]
#39 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1111]
#40 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1115]
#41 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:675]
#42 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [vendor/magento/framework/View/Layout.php:566]
#43 Magento\Framework\View\Layout->_renderBlock() called at [vendor/magento/framework/View/Layout.php:542]
#44 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#45 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#46 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#47 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#48 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#49 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#50 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#51 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#52 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#53 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#54 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#55 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#56 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#57 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#58 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#59 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#60 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#61 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#62 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#63 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#64 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#65 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#66 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#67 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#68 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#69 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#70 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#71 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#72 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:594]
#73 Magento\Framework\View\Layout->_renderContainer() called at [vendor/magento/framework/View/Layout.php:544]
#74 Magento\Framework\View\Layout->renderNonCachedElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:149]
#75 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement() called at [vendor/magento/framework/View/Layout.php:497]
#76 Magento\Framework\View\Layout->renderElement() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:140]
#77 Magento\Framework\View\Layout\Interceptor->renderElement() called at [vendor/magento/framework/View/Layout.php:963]
#78 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#79 Magento\Framework\View\Layout\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#80 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#81 Magento\Framework\View\Layout\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:347]
#82 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#83 Magento\Framework\View\Result\Page->render() called at [vendor/magento/framework/View/Result/Layout.php:171]
#84 Magento\Framework\View\Result\Layout->renderResult() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#85 Magento\Framework\View\Result\Page\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#86 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#87 Magento\Framework\View\Result\Page\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:95]
#88 Magento\Framework\View\Result\Page\Interceptor->renderResult() called at [vendor/magento/framework/App/View.php:221]
#89 Magento\Framework\App\View->renderLayout() called at [app/code/Mageplaza/AjaxLayer/Controller/Search/Result/Index.php:152]
#90 Mageplaza\AjaxLayer\Controller\Search\Result\Index->execute() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#91 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#92 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php:51]
#93 Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#94 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#95 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->___callPlugins() called at [generated/code/Mageplaza/AjaxLayer/Controller/Search/Result/Index/Interceptor.php:23]
#96 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->execute() called at [vendor/magento/framework/App/Action/Action.php:111]
#97 Magento\Framework\App\Action\Action->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#98 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#99 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#100 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->___callPlugins() called at [generated/code/Mageplaza/AjaxLayer/Controller/Search/Result/Index/Interceptor.php:32]
#101 Mageplaza\AjaxLayer\Controller\Search\Result\Index\Interceptor->dispatch() called at [vendor/magento/framework/App/FrontController.php:186]
#102 Magento\Framework\App\FrontController->processRequest() called at [vendor/magento/framework/App/FrontController.php:118]
#103 Magento\Framework\App\FrontController->dispatch() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#104 Magento\Framework\App\FrontController\Interceptor->___callParent() called at [vendor/magento/framework/Interception/Interceptor.php:138]
#105 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-store/App/FrontController/Plugin/RequestPreprocessor.php:99]
#106 Magento\Store\App\FrontController\Plugin\RequestPreprocessor->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#107 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/module-page-cache/Model/App/FrontController/BuiltinPlugin.php:71]
#108 Magento\PageCache\Model\App\FrontController\BuiltinPlugin->aroundDispatch() called at [vendor/magento/framework/Interception/Interceptor.php:135]
#109 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#110 Magento\Framework\App\FrontController\Interceptor->___callPlugins() called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:23]
#111 Magento\Framework\App\FrontController\Interceptor->dispatch() called at [vendor/magento/framework/App/Http.php:116]
#112 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:23]
#113 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:263]
#114 Magento\Framework\App\Bootstrap->run() called at [index.php:39]
4
  • Are there more than one website that is using the same elastic search in the same server? Mar 22 at 10:05
  • Yes I have two websites on the same server, I do have different prefixes on both though
    – deepo311
    Mar 22 at 10:37
  • Ok then have you tried reindexing? sometimes this issue will be fixed after running reindexing 2-3 times. Mar 22 at 11:01
  • Yes several times, nothing works
    – deepo311
    Mar 22 at 11:04
0

Please check the following reported issue: https://github.com/magento/magento2/issues/30540 looks like an issue with attributes of type 'decimal' which are set to be searchable. My advice is to track those down and apply a workaround until this is officially fixed. Or simply unset those attributes to be unsearchable.

The link provides both the lead to track the attributes with issues and a workaround. I haven't encounter this issue and didn't need to use this workaround, but the code looks good (as a temporary solution, obviously).

2
  • Hi thanks, I did try this, there was only price that was searchable but disabling this had no effect. I'm starting to think maybe its not related to elasticsearch
    – deepo311
    Mar 22 at 12:44
  • no problem. well in this case, i suggest you disable/ remove the 3rd party integrations and take if from there. good luck and i hope you sort this out soon! Mar 22 at 12:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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