How to use Elasticsearch?
Elasticsearch is a full-text, distributed NoSQL database for big data. It has amazing options for real-time searching and data analyzing. Shopware recommends the usage of Elasticsearch for large data sets of products. They also support in its search engine for better search results. Here is a sample of a docker setup that adds a new Elasticsearch instance to your Docker network. Just add the container and make sure its on the same network.
docker-compose.ymlversion: "3"services:shopware:image: dockware/play:latestcontainer_name: shopwareports:- "80:80"networks:- webelasticsearch:image: elasticsearch:7.5.2container_name: elasticsearchnetworks:- webenvironment:- "EA_JAVA_OPTS=-Xms512m -Xms512m"- discovery.type=single-nodenetworks:web:external: false
Now make sure you configure the Elasticsearch instance to be used.
Add the following to your ".env" file: