We recommend customers using Magento 2.3 to switch their Catalog Search to Elasticsearch. 

Benefits from using Elasticsearch include:

  • Advanced and quick searches on Magento catalog
  • Multi-language support
  • Support for stop words and synonyms
  • Indexing does not affect customers until reindex is complete 

 

Here is an example of how to do that on CentOS server:

Remember to Backup before doing this.

Execute the following commands.  They have been tested to work on our CentOS servers.

 

yum -y install java-1.8.0-openjdk

rpm --import https://artifacts.elastic.co/GPG-KEY-elasticsearch

 

vi /etc/yum.repos.d/elasticsearch.repo

Paste the following code:

[elasticsearch-6.x]

name=Elasticsearch repository for 6.x packages

baseurl=https://artifacts.elastic.co/packages/6.x/yum

gpgcheck=1

gpgkey=https://artifacts.elastic.co/GPG-KEY-elasticsearch

enabled=1

autorefresh=1

type=rpm-md

 

sudo yum install elasticsearch

sudo service elasticsearch start

systemctl enable elasticsearch

yum install lttng-ust

curl -XGET 'localhost:9200/_cat/health?v&pretty'

 

Now we can change Catalog Search inside Magento Admin.

Login to Admin

Go to - Stores -> Configuration ->Catalog -> Catalog Search

Change Search Engine to Elastic Search 6.0+

Reindex and Test

 

To translate anything related to elasticsearch you need to enter it in the translation file

"Did you mean","Може би търсите","module","Elasticsearch_Elasticsearch"

 

Comparison between Elasticsearch and the Default Magento Search. Numbers represent SQL queries of the layered navigation block (lower numbers equal higher page speed)