cancel
Showing results for 
Search instead for 
Did you mean: 

Can we disable Elasticsearch from magento 2.4???

SOLVED

Re: Can we disable Elasticsearch from magento 2.4???

Hello

I have intalled magento2.4 with elasticsearch version 7..  Resources are 4 core and 8gb ram , startup web application.   Elastic search is consuming more then half of the memory , which is making the server down and elasticsearch getting turned off automatically very often.. Can you please help me in configuring memory consumption of elastic search...

Re: Can we disable Elasticsearch from magento 2.4???

Hello, you may try this module to disable elasticsearch properly:

https://github.com/zepgram/module-disable-search-engine

Re: Can we disable Elasticsearch from magento 2.4???

Hey, as far as I know elasticsearch is free to use and open source.

 

 

Re: Can we disable Elasticsearch from magento 2.4???

You can save value for 'mysql' 

 php -f bin/magento config:set catalog/search/engine 'mysql'

 

and it'll work but you won't be able to search anything on your storefront. So shortly, magento has completely removed mysql , we won't be able to run searches on mysql 

Re: Can we disable Elasticsearch from magento 2.4???

use this module and disable elasticsearch by default in the install command 

https://swissuplabs.com/magento-2-mysql-legacy-search.html

 

and set the 'catalog/search/engine' as 'lmysql' using command line and then it will work

Re: Can we disable Elasticsearch from magento 2.4???

We can disable the Elastic search and eventually installed the Magento 2.But it will throw errors while working in admin later. Its better advised to keep turn it on.

To check the status

php -f bin/magento config:show catalog/search/engine

 

Anees

Re: Can we disable Elasticsearch from magento 2.4???

Not a solution.  As janky as Magento is, a collection of poorly written, inefficient scripts that require constant twiddling with, adding another requirement that is also Janky and inefficient (ElasticSearch) makes Magento no longer a reasonable choice for the majority of small eCommerce vendors.  

Re: Can we disable Elasticsearch from magento 2.4???

Didn't work in 2.4

 

Re: Can we disable Elasticsearch from magento 2.4???

To remove elastic search and get it to complete setup - just open config.xml and put 0 to all elastic search modules

Re: Can we disable Elasticsearch from magento 2.4???

After some research I found a solution for this. Magento stores all credentials in 

magento\vendor\magento\module-elasticsearch-7 in config.xml. Please add your cred here and restart your installation - you should be OK, Replace XXXXX by your generated password for default user (elastic)

<?xml version="1.0"?>
<!--
/**
* Copyright © Magento, Inc. All rights reserved.
* See COPYING.txt for license details.
*/
-->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
<default>
<catalog>
<search>
<engine>elasticsearch7</engine>
<elasticsearch7_server_hostname>localhost</elasticsearch7_server_hostname>
<elasticsearch7_server_port>9200</elasticsearch7_server_port>
<elasticsearch7_index_prefix>magento2</elasticsearch7_index_prefix>
<elasticsearch7_enable_auth>1</elasticsearch7_enable_auth>
<elasticsearch7_username>elastic</elasticsearch7_username>
<elasticsearch7_password>XXXXX</elasticsearch7_password>
<elasticsearch7_server_timeout>15</elasticsearch7_server_timeout>
<elasticsearch7_minimum_should_match/>
</search>
</catalog>
</default>
</config>