# Can I use elasticsearch/opensearch in community edition?

**URL:** <https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539>\
**Category:** General Questions (EN)\
**Tags:** general\
**Created:** [3. Mai 2023 um 22:50 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539 "2023-05-03T22:50:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![akos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/akos/32/20479_2.png) [@akos](https://forum.shopware.com/u/akos)\
**Post date:** [3. Mai 2023 um 22:50 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/1 "2023-05-03T22:50:33Z")

</div>

For now I’m planning to use Shopware for free, with community edition for a startup project.

In the dev documentation I read about using Elasticsearch/Opensearch and started setting it up according to the docs. However, at the same time I see in the docs that:

**To configure which fields and elements are searchable when using Elasticsearch, you must install the extension[Advanced Search](https://docs.shopware.com/en/shopware-6-en/enterprise-extensions/enterprise-search).**

And seeing that:  
The Advanced Search is available to you as an extension of the Shopware Evolve plan.

I’m not sure therefore, what is included in the Community/free plan, is opensearch included at all, and only configuring special/custom fields is part of the Evolve plan, or the whole Elasticsearch belongs to paid plans only?

Started thinking also as although I followed instructions to setup ES, I’m getting:

# No alive nodes found in your cluster

---

<div class="post-metadata">

**Author:** ![btxtiger](https://avatars.discourse-cdn.com/v4/letter/b/ecae2f/32.png) [@btxtiger](https://forum.shopware.com/u/btxtiger)\
**Post date:** [21. Mai 2023 um 18:49 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/2 "2023-05-21T18:49:47Z")

</div>

For Shopware 6.4.20.x currently only elasticsearch 7 seems to be working properly.  
For 6.5.0 neither elasticsearch nor opensearch ran successfully in my setup

Make sure to setup your .env properly:

```auto
SHOPWARE_ES_HOSTS=elasticsearch:9200
OPENSEARCH_URL=elasticsearch:9200
SHOPWARE_ES_ENABLED=1
SHOPWARE_ES_INDEXING_ENABLED=1
SHOPWARE_ES_INDEX_PREFIX=apcsw6
SHOPWARE_ES_THROW_EXCEPTION=1 # this prevents querying the DB as fallback
ADMIN_OPENSEARCH_URL=elasticsearch:9200
SHOPWARE_ADMIN_ES_ENABLED=1
SHOPWARE_ADMIN_ES_REFRESH_INDICES=1
SHOPWARE_ADMIN_ES_INDEX_PREFIX=sw6_admin

```

```auto
bin/console es:admin:index
bin/console es:index

```

---

<div class="post-metadata">

**Author:** ![ansgar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/ansgar/32/7871_2.png) [@ansgar](https://forum.shopware.com/u/ansgar)\
**Post date:** [17. November 2023 um 08:34 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/3 "2023-11-17T08:34:27Z")

</div>

For using OpenSearch in SW 6.5.x you need the following additional line in your .env (or .env.local):

ES\_MULTILINGUAL\_INDEX=1

This just fixed several things for me:

- indexes for product\_manufacturer and category were missing, now they are created
- in admin \> settings \> seach, I now get additional features for configuring Advanced Search
- in frontend, the search is now working. Previously I got an elasticsearch.CRITICAL index\_not\_found\_exception: no such index [myprefix\_product]

---

<div class="post-metadata">

**Author:** ![akos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/akos/32/20479_2.png) [@akos](https://forum.shopware.com/u/akos)\
**Post date:** [12. März 2024 um 11:00 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/4 "2024-03-12T11:00:33Z")

</div>

Getting back to this very late; thank you both for the valuable input.  
I managed to finally set the environment up with AWS / Amazon OpenSearch service (if someone needs info about the AWS settings and configuring security, I’m happy to help).

I have two more additions:  
After running `es:index` and `es:admin:index` I was still getting errors about indexes not found; running `bin/console es:create:alias` solved it finally.

Another interesting thing is that when I finally managed to set up the OpenSearch connection, I was getting a MySQL error when trying to run the indexes. It turned out that two tables: `admin_elasticsearch_index_task` and `elasticsearch_index_task` were not created with my latest installation, based on Shopware 6.5.8.7. However, I found those tables in a database instance from an earlier version and copied those over.  
Not sure why those tables are missing or if an additional component or migration should be run.

---

<div class="post-metadata">

**Author:** ![akos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/akos/32/20479_2.png) [@akos](https://forum.shopware.com/u/akos)\
**Post date:** [12. März 2024 um 11:10 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/5 "2024-03-12T11:10:59Z")

</div>

> - in admin \> settings \> seach, I now get additional features for configuring Advanced Search

Did you install this in community edition? Did you need to install something separately to see Advanced Search configuration? For me it’s still not visible in the admin.

---

<div class="post-metadata">

**Author:** ![ansgar](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/ansgar/32/7871_2.png) [@ansgar](https://forum.shopware.com/u/ansgar)\
**Post date:** [12. März 2024 um 12:43 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/6 "2024-03-12T12:43:33Z")

</div>

Yes, in the community edition, but with an (older) Diamond license.

I uninstalled the old SwagEnterpriseSearchPlatform plugin, which was required in v6.4.x. For v6.5.x I installed the SwagCommercial plugin, which is required for activating any feature for which you need a license. Elastic/OpenSearch is available from the Evolve license upwards, and for some of the older licenses.

---

<div class="post-metadata">

**Author:** ![akos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/akos/32/20479_2.png) [@akos](https://forum.shopware.com/u/akos)\
**Post date:** [12. März 2024 um 13:26 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/7 "2024-03-12T13:26:52Z")

</div>

Thanks for the clarification.  
So at the current point it seems that I can have OpenSearch running in the community edition, but don’t have a tool to configure it 🙂 (unless I figure out how to do it manually).  
But maybe the default configuration would do it, I’m still just experimenting/setting up my first webshop.

---

<div class="post-metadata">

**Author:** ![Nico-CP](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@Nico-CP](https://forum.shopware.com/u/Nico-CP)\
**Post date:** [14. August 2024 um 08:23 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/8 "2024-08-14T08:23:39Z")

</div>

Hey @akos, did you figure out how to configure it manually // was the default config sufficient?

I’m looking into the same topic currently

---

<div class="post-metadata">

**Author:** ![akos](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/akos/32/20479_2.png) [@akos](https://forum.shopware.com/u/akos)\
**Post date:** [20. August 2024 um 00:19 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/9 "2024-08-20T00:19:17Z")

</div>

Hi Nico, actually, yes. Here are my notes for everyone interested, how to set it up in AWS environment, using AWS OpenSearch:

- Use Amazon OpenSearch service: [https://eu-north-1.console.aws.amazon.com/aos/](https://eu-north-1.console.aws.amazon.com/aos/)
- Create a domain
  - Eligible for free tier: `t3.small.search`

- Make sure to create in the same VPC as EC2
- Under security configuration:
  - Enable fine-grain control and create an admin username and password (to be used in the connection string, find below as [os\_username]:[os\_password])

- Create a VPC endpoint:
  - Same VPC as EC2
  - Same Subnet as EC2
  - The opensearch security group:
    - Allow inbound on 22 and 443 from the EC2’s security group
    - Apply this security group to the VPC and the OpenSearch domain

Shopware configuration (add to .env.local):

```auto
OPENSEARCH_URL=https://[os_username]:[os_password]@[vpc-....es.amazonaws.com]:443
SHOPWARE_ES_ENABLED=1
SHOPWARE_ES_INDEXING_ENABLED=1
SHOPWARE_ES_INDEX_PREFIX=sw6
SHOPWARE_ES_THROW_EXCEPTION=1 # this prevents querying the DB as fallback
ADMIN_OPENSEARCH_URL=https://[os_username]:[os_password]@[vpc-....es.amazonaws.com]:443
SHOPWARE_ADMIN_ES_ENABLED=1
SHOPWARE_ADMIN_ES_REFRESH_INDICES=1
SHOPWARE_ADMIN_ES_INDEX_PREFIX=sw6_admin
SHOPWARE_ES_MULTILINGUAL_INDEX=1

```

Running initial indexing (in Shopware root folder):

```auto
bin/console es:admin:index
bin/console es:index
bin/console es:create:alias

```

Setting up a tunnel to the dashboard

Set up a tunnel in SSH connection as:  
`ssh -i .\.ssh\[server-private-key].pem ubuntu@[IP] -N -L 9100:[vpc-....es.amazonaws.com]:443`

Access the dashboard from the local machine through: [https://localhost:9100/\_dashboards/](https://localhost:9100/_dashboards/)

**Important part: Database**

Two tables were missing in the latest install: `admin_elasticsearch_index_task` and `elasticsearch_index_task` were not created with my latest installation, based on Shopware 6.5.8.7. However, I found those tables in a database instance from an earlier version and copied those over.

```auto
--
-- Set character set the client will use to send SQL statements to the server
--
SET NAMES 'utf8';

--
-- Create table `elasticsearch_index_task`
--
CREATE TABLE elasticsearch_index_task (
  id binary(16) NOT NULL,
  `index` varchar(500) NOT NULL,
  alias varchar(500) NOT NULL,
  entity varchar(500) NOT NULL,
  doc_count int NOT NULL,
  PRIMARY KEY (id)
)
ENGINE = INNODB,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_unicode_ci,
ROW_FORMAT = DYNAMIC;

--
-- Create table `admin_elasticsearch_index_task`
--
CREATE TABLE admin_elasticsearch_index_task (
  id binary(16) NOT NULL,
  `index` varchar(500) NOT NULL,
  alias varchar(500) NOT NULL,
  entity varchar(500) NOT NULL,
  doc_count int NOT NULL,
  PRIMARY KEY (id)
)
ENGINE = INNODB,
AVG_ROW_LENGTH = 1024,
CHARACTER SET utf8mb4,
COLLATE utf8mb4_unicode_ci,
ROW_FORMAT = DYNAMIC;

```

---

<div class="post-metadata">

**Author:** ![Nico-CP](https://avatars.discourse-cdn.com/v4/letter/n/f1d935/32.png) [@Nico-CP](https://forum.shopware.com/u/Nico-CP)\
**Post date:** [20. August 2024 um 08:25 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/10 "2024-08-20T08:25:50Z")

</div>

Awesome, thank you so much @akos ! 🤜🏻 🤛🏻

---

<div class="post-metadata">

**Author:** ![christoph\_poetz](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.shopware.com/christoph_poetz/32/26150_2.png) [@christoph\_poetz](https://forum.shopware.com/u/christoph_poetz)\
**Post date:** [5. Mai 2025 um 14:05 UTC](https://forum.shopware.com/t/can-i-use-elasticsearch-opensearch-in-community-edition/99539/12 "2025-05-05T14:05:45Z")

</div>

OpenSearch / Elasticsearch can be used without any Shopware plan with the Shopware Community Edition.  
If you want to configure the search (e.g. which fields should be used for search and their ranking or prioritization of dynamic product groups) you need an external plugin or a Shopware plan with the Advanced Search. The setup, indexing and usage of OpenSearch / Elasticsearch is documented by Shopware which is the same if you use the Community Edition: [Shopware Elasticsearch / OpenSearch Setup](https://developer.shopware.com/docs/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.html#variables-in-your-env)
