Skip to content
Romain Ruaud edited this page Jun 7, 2016 · 3 revisions

Magento 2 Module Install

Requirements

  • ElasticSearch 2.1 or higher with
    • Enabled scripting
    • ICU and Phonetic plugin installed
  • Magento 2.0.2 or higher

In order to get a properly set up ElasticSearch server you should read the following page of the wiki ElasticSearch server configuration

Install ElasticSuite through composer :

composer require smile/elasticsuite

Enable the module and run ElasticSuite setup:

bin/magento module:enable Smile_ElasticsuiteCore Smile_ElasticsuiteCatalog Smile_ElasticsuiteSwatches Smile_ElasticsuiteCatalogRule Smile_ElasticsuiteVirtualCategory Smile_ElasticsuiteThesaurus Smile_ElasticsuiteTracker
bin/magento setup:upgrade

Configure ElasticSearch server :

You can configure your ElasticSearch server via Stores > Configuration > Smile Elastic Suite > Base Settings

Client configuration

ElasticSearch Client

Parameter Default value Description
ElasticSearch servers list localhost:9200 This a comma-separated list of servers in the [host]:[port] format where you should indicate all your ElasticSearch nodes. E.g. : "es-node1.fqdn:9200, es-node2.fqdn:9200".
Enable debug mode No When this parameter is set to "Yes", the module produces logs through the Magento logging system.
Server connection timeout 1 In seconds, the default timeout used when querying the server.

Indices Settings

Indices Settings

Parameter Default value Description
Indices alias name magento2 The default alias put by the module on Magento's related indices.

An alias per store and entity type will be generated with the following format : [indices_alias_name]_[store_code]_[entity_type].

E.g. : magento2_default_catalog_product.
Indices name pattern {{YYYYMMdd}}_{{HHmmss}} The horodated pattern used when creating new index.

An index name per store and entity type, based on the horodated pattern, will be generated with the following format : [indices_alias_name]_[store_code]_[entity_type]_[horodated_pattern].

The E.g. : magento2_default_catalog_product_20160304_094708.
Number of shards per index 1 The number of shards per index. A shard is a single Lucene instance and they are distributed by ElasticSearch amongst all nodes in the cluster.

You can see the Shard definition on the ElasticSearch glossary for more informations.
Number of replicas per index 0 The number of replicas shards per index. Main purposes of replica shards is for failover : if the node holding a primary shard dies, a replica is promoted to the role of primary.

You can read more about Replica Shards on the ElasticSearch documentation.

Configure ElasticSuite as Magento Search Engine :

You can configure Magento to use Smile ElasticSuite as search engine via Stores > Configuration > Catalog > Catalog Search

ES as Search Engine

Parameter Default value Description
Minimal Query Length 1 The minimal search query length to be processed by the engine.
Maximum Query Length 128 The maximum search query length to be processed by the engine.
Search Engine MySQL The default Search Engine used by Magento. Set it to Smile ElasticSuite to use it as Search Engine.

Process first indexing :

Once you have completed the 2 previous points, you can process a full reindexing of the catalogsearch_fulltext index.

bin/magento index:reindex catalogsearch_fulltext

Once the reindex is done, you are all set and can view your frontend catalog and search pages being rendered via Smile Elastic Suite !