From 62d4c95567a56e3144a73fa9f56b66c4aa5c9076 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 12:18:32 +0000 Subject: [PATCH 1/2] Initial plan From 34632d07fbc1b149a3c0308a8498122621ef7053 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Fri, 20 Mar 2026 12:21:06 +0000 Subject: [PATCH 2/2] fix: address review feedback on OpenSearch admin docs Co-authored-by: vienthuong <22548423+vienthuong@users.noreply.github.com> --- .../configurations/shopware/environment-variables.md | 1 + .../infrastructure/elasticsearch/elasticsearch-setup.md | 6 +++++- guides/hosting/performance/performance-tweaks.md | 6 +++--- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/guides/hosting/configurations/shopware/environment-variables.md b/guides/hosting/configurations/shopware/environment-variables.md index 5a8aad58d..198d83a01 100644 --- a/guides/hosting/configurations/shopware/environment-variables.md +++ b/guides/hosting/configurations/shopware/environment-variables.md @@ -27,6 +27,7 @@ This page lists all environment variables that can be used to configure Shopware | `DATABASE_SSL_DONT_VERIFY_SERVER_CERT` | (empty) | Disables verification of the server certificate (1 disables it) | | `DATABASE_SSL_KEY` | (empty) | Path to SSL Key file | | `DATABASE_URL` | (empty) | MySQL credentials as DSN | +| `ENABLE_OPENSEARCH_FOR_ADMIN_API` | (empty) | When set to `1`, applies OpenSearch globally for supported Admin API searches and listings in Administration. Requires `ADMIN_OPENSEARCH_URL` and `SHOPWARE_ADMIN_ES_ENABLED=1` to be configured. Experimental feature (since 6.7.9.0) | | `ENABLE_SERVICES` | `auto` | Determines if services are enabled, auto detects that based on `APP_ENV`, other possible values are `true` (or `1`) and `false` (or `0`). When set to `0`, Shopware Services won't be installed on the system | | `FASTLY_API_KEY` | (empty) | API key for Fastly CDN integration. **Keep this value secure and do not commit it to version control.** | | `INSTANCE_ID` | (empty) | Unique Identifier for the Store: Can be generated with `openssl rand -hex 32` | diff --git a/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md b/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md index c5c30c4ec..ed5a32fd6 100644 --- a/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md +++ b/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md @@ -198,7 +198,7 @@ Shopware 6.4.19.0 and above supports "AND/OR Search" functionality in Administra Add the below config variables to set up Elasticsearch for Administration: ```bash -ADMIN_OPENSEARCH_URL=YOUR OPEN SEARCH URL +ADMIN_OPENSEARCH_URL=YOUR OPENSEARCH URL SHOPWARE_ADMIN_ES_ENABLED=1 SHOPWARE_ADMIN_ES_INDEX_PREFIX=sw-admin SHOPWARE_ADMIN_ES_INDEXING_BATCH_SIZE=1000 @@ -220,6 +220,10 @@ Advanced admin users can refer to [elasticsearch reference guide](https://www.el ### Apply OpenSearch globally in Admin API +::: info +This feature requires Administration OpenSearch to be configured first. Make sure `ADMIN_OPENSEARCH_URL` is set and `SHOPWARE_ADMIN_ES_ENABLED=1` is enabled before proceeding. +::: + To apply OpenSearch globally for supported Admin API searches (for example listings, filtering, and search in administration modules), enable the feature flag below: ```bash diff --git a/guides/hosting/performance/performance-tweaks.md b/guides/hosting/performance/performance-tweaks.md index 044a248f2..9ab1264d7 100644 --- a/guides/hosting/performance/performance-tweaks.md +++ b/guides/hosting/performance/performance-tweaks.md @@ -88,9 +88,9 @@ Therefore, using DBAL (plain SQL) is much faster than using the DAL in many scen Refer to this article to know more on [when to use plain SQL and DAL](../../../resources/references/adr/2021-05-14-when-to-use-plain-sql-or-dal). -## Elasticsearch/Opensearch +## Elasticsearch/OpenSearch -Elasticsearch/Opensearch is a great tool to reduce the load of the MySQL server. +Elasticsearch/OpenSearch is a great tool to reduce the load of the MySQL server. Especially for systems with large product assortments, this is a must-have since MySQL simply does not cope well above a certain assortment size. When using Elasticsearch, it is important to set the `SHOPWARE_ES_THROW_EXCEPTION=1` `.env` variable. @@ -99,7 +99,7 @@ In large projects, the failure of Elasticsearch leads to the MySQL server being If you use Elasticsearch/OpenSearch for Administration as well, you can set `SHOPWARE_ADMIN_ES_THROW_EXCEPTION=1` in local development to debug admin search issues more easily. -To apply OpenSearch globally for supported Admin API searches and listings in Administration, enable `ENABLE_OPENSEARCH_FOR_ADMIN_API=1` and reindex admin indices with `bin/console es:admin:index`. +To apply OpenSearch globally for supported Admin API searches and listings in Administration, first ensure that Administration OpenSearch is configured (`ADMIN_OPENSEARCH_URL` is set and `SHOPWARE_ADMIN_ES_ENABLED=1`). Then enable `ENABLE_OPENSEARCH_FOR_ADMIN_API=1` and reindex admin indices with `bin/console es:admin:index`. ::: info Supported since Shopware `6.7.9.0`. This is an experimental feature. For implementation details and supported entities, refer to the ADR [Apply OpenSearch globally for admin-api](../../../resources/references/adr/2026-01-28-apply-opensearch-in-admin-api.md).