I was curious what would happen if I stopped the Elasticsearch service in Magento 2.4. What I found I cant seem to understand.

When the service is stopped it empties all the categories. I would have assumed Elasticsearch was for the mini search/advanced search not the catalog listings.

Can anyone confirm if this is by design or is there a bug in Magento 2.4? Also any ideas on how to fix this?

My setup is Magento 2.4 on Valet (MacOs/PHP 7.3.20). I installed Elasticsearch via Homebrew.

Elasticsearch running With Elasticsearch running

Elasticsearch stopped With Elasticsearch stopped

  • 1
    elastic search is used for all catalog search functions including product category lists and filtering. Disabling it in 2.4 is not an option... – paj Jul 31 '20 at 9:59
  • One question apart from your issue, I’m not able to install using valet plus, what ES version you using ? I’m getting error while installing. – Sudhanshu Bajaj Jul 31 '20 at 11:44
  • @SudhanshuBajaj I am using Valet not Valet Plus. ES is version 7.8.0 – Paul Donnelly Jul 31 '20 at 12:02

ElasticSearch is in charge of the entire catalog and search, provisioning the data to Magento 2.4.

ElasticSearch is a requirement in Magento 2.4, as you can see in the page Magento 2.4 technology stack requirements, so it never can be disabled like in Magento 2.3.

I recommend to set the services to auto-restart in a production server, so if ElasticSearch or MySQL service goes down, it will restart automatically. You can do it in Docker using the parameter below.

docker run --restart=always
  • 1
    Thank you for confirming this is by design. I was aware it was a requirement but assume it was for search only. – Paul Donnelly Aug 1 '20 at 15:55
  • gah that's annoying - i have a third party search already setup on my M2 - but now I have to get a whole java stack on top no matter what? – iphigenie Aug 3 '20 at 9:16
  • you can set up your search engine as the main search engine instead of ElasticSearch. @iphigenie – Rafael Corrêa Gomes Aug 3 '20 at 13:04
  • 1
    Thanks @RafaelCorrêaGomes I had undestood you could not even upgrade to M2.4 without a configured elastic search. I guess I'll do a test run – iphigenie Aug 7 '20 at 13:19

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.