> For the complete documentation index, see [llms.txt](https://docs.dockware.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dockware.io/tutorials/shopware-tutorials/shopware-and-elasticsearch.md).

# Shopware and Elasticsearch

**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.

{% code title="docker-compose.yml" %}

```yaml
version: "3"

services:
        
    shopware:
      image: dockware/shopware:latest
      container_name: shopware
      ports:
         - "80:80"
      networks:
         - web
      
    elasticsearch:
      image: elasticsearch:7.5.2
      container_name: elasticsearch
      networks:
        - web
      environment:
        - "EA_JAVA_OPTS=-Xms512m -Xms512m"
        - discovery.type=single-node

networks:
  web:
    external: false
```

{% endcode %}

Now make sure you configure the Elasticsearch instance to be used.

Add the following to your ".env" file:

{% code title=".env (partial)" %}

```yaml
SHOPWARE_ES_HOSTS=elasticsearch:9200
SHOPWARE_ES_ENABLED=1
SHOPWARE_ES_INDEXING_ENABLED=1
SHOPWARE_ES_INDEX_PREFIX=abc
```

{% endcode %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dockware.io/tutorials/shopware-tutorials/shopware-and-elasticsearch.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
