composer require shopware/elasticsearch. In this documentation we will provide you a short overview about the functionalities of Elasticsearch on your server and the configuration, activation and indexing process in Shopware for live and test environments.
cluster.name) and node (
node.name), which nodes know each other (
discovery.seed_hosts), as well as the type of the node (
node.ingest) and the host (
network.host) and port (
network.host). Sometimes it makes sence to configure your JVM as well, you should only do changes here if you exactly know what you do. Most hosting partners will provide you with a fitting setup, that will not require many changes here. The data files of the index will be found in the data directory later on. Another important folder is the logs folder. If not configured differently you will find the different logfiles for your cluster in here in case you ever need to check an error or slowlog.
bin/console cache:clearso the changes from your .env can be processed.
bin/console dal:refresh:index --use-queue. Please mind using the
--use-queueoption because you will have too many products to index without the message queue involved.
bin/console es:create:aliasafter the indexing was processed completely. Try that command if your index was created fully without errors and you still do not see products in your storefront.
dead_messagestable and will be processed again after a specific timeframe.
bin/console messenger:consumeand also add output to the processed messages by adding the parameter
bin/console messenger:consume -vv. In an productive environment you want to deactivate the admin messenger which is started automatically when opening a session in your administration view by following this documentation.