Included in the suite are
Here is a list of instructions to run on the server to install the suite on an existing Magento 2 store. We assume you don’t already have ElasticSearch installed (skip steps 1 and 2 if you do).
First, you will need a Java Runtime Environment (JRE) because ElasticSearch is written in the Java programming language.
sudo apt-get install openjdk-8-jre
Download and install the Public Signing Key:
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -
Download the compatible version for Elasticsuite :
cd /home
sudo mkdir elastic
cd elastic
sudo apt-get install apt-transport-https
sudo wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-5.6.16.deb
sudo sha1sum elasticsearch-5.6.16.deb
sudo dpkg -i elasticsearch-5.6.16.deb
Now you can try to start the ElasticSearch instance
sudo service elasticsearch start
You can then test that your ES instance is started by checking the response of the following command :
curl localhost:9200
This should produce something like the following output :
"name" : "GqiI8dz",
"cluster_name" : "docker-cluster",
"cluster_uuid" : "uosgC6uvQWeipo3c9sNEEg",
"version" : {
"number" : "5.6.0",
"build_hash" : "781a835",
"build_date" : "2017-09-07T03:09:58.087Z",
"build_snapshot" : false,
"lucene_version" : "6.6.0"
},
"tagline" : "You Know, for Search"
}
You have now to install some plugins that are required by Smile Elastic Suite.
Plugins can be installed with the bin/elasticsearch-plugin tool of Elastic Search.
You have to go to your Elastic Search installation directory.
Locate your “Home” directory ( Look for Settings -> Path -> Home in the following command output for value ).
curl "localhost:9200/_nodes/settings?pretty=true"
"settings" : {
"pidfile" : "/var/run/elasticsearch/elasticsearch.pid",
"cluster" : {
"name" : "elasticsearch"
},
"path" : {
"conf" : "/etc/elasticsearch",
"data" : "/var/lib/elasticsearch",
"logs" : "/var/log/elasticsearch",
"home" : "/usr/share/elasticsearch"
},
Go to the “Home” directory :
cd /usr/share/elasticsearch
Install plugins :
sudo bin/elasticsearch-plugin install analysis-phonetic
sudo bin/elasticsearch-plugin install analysis-icu
Restart ElasticSearch node in order to apply change :
sudo service elasticsearch restart
Note : If you are using an ElasticSearch cluster with several nodes you have to install the plugins on each nodes.
First find out which version of the suite you need, by matching the release version to the version of Magento 2 you have from this page
For this tutorial we will install the latest version with this command
composer require smile/elasticsuite ^2.8.0
You will need access keys from Magento.
If the composer command asks you for the keys, enter the public key for the username and the private key for the password.
Now you need to clear the Magento cache, make sure you are in the Magento application web root
sudo php bin/magento cache:clean
sudo php bin/magento cache:flush
Install the ElasticSuite modules
sudo php bin/magento module:enable Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteSwatches Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteVirtualCategory Smile_ElasticsuiteThesaurus Smile_ElasticsuiteCatalogOptimizer Smile_ElasticsuiteTracker
Now make Magento perform an upgrade and compile the new classes
sudo php bin/magento setup:upgrade
sudo php bin/magento setup:di:compile
sudo php bin/magento indexer:reindex
Finally set the folder permissions to allow the static content and admin files to be re-generated
sudo chmod -R 777 var && sudo chmod -R 777 pub && sudo chmod -R 777 generated