diff --git a/guides/hosting/configurations/shopware/environment-variables.md b/guides/hosting/configurations/shopware/environment-variables.md index 4e6e52b0f7..ff9a3abf33 100644 --- a/guides/hosting/configurations/shopware/environment-variables.md +++ b/guides/hosting/configurations/shopware/environment-variables.md @@ -46,7 +46,7 @@ This page lists all environment variables that can be used to configure Shopware | `SHOPWARE_ADMIN_ES_ENABLED` | (empty) | Enable Elasticsearch for administration | | `SHOPWARE_ADMIN_ES_INDEX_PREFIX` | `sw-admin` | Index prefix for administration Elasticsearch | | `SHOPWARE_ADMIN_ES_INDEXING_BATCH_SIZE` | `1000` | Batch size for administration Elasticsearch indexing (since 6.7.9.0) | -| `SHOPWARE_ADMIN_ES_REFRESH_INDICES` | (empty) | Refresh administration indices | +| `SHOPWARE_ADMIN_ES_REFRESH_INDICES` | (empty) | Automatically create missing administration indices and aliases when an indexed entity is written, instead of requiring `bin/console es:admin:index` (`1` to enable, `0` to disable). Costs one alias check per indexer on every write, and auto-created indices start empty until a full reindex. | | `SHOPWARE_ADMIN_ES_THROW_EXCEPTION` | `1` | Whether to throw exceptions on administration Elasticsearch errors (`1` to enable, `0` to disable). Mainly useful in local development for debugging (since 6.7.9.0) | | `SHOPWARE_ADMINISTRATION_PATH_NAME` | `admin` | Custom path name for administration interface | | `SHOPWARE_DBAL_TIMEZONE_SUPPORT_ENABLED` | `0` | Enable timezone support in DBAL | diff --git a/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md b/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md index 6e9f1ad219..fccc693521 100644 --- a/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md +++ b/guides/hosting/infrastructure/elasticsearch/elasticsearch-setup.md @@ -202,10 +202,14 @@ 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 -SHOPWARE_ADMIN_ES_REFRESH_INDICES=1 +SHOPWARE_ADMIN_ES_REFRESH_INDICES=0 SHOPWARE_ADMIN_ES_THROW_EXCEPTION=1 ``` +::: info +`SHOPWARE_ADMIN_ES_REFRESH_INDICES=1` makes Shopware create missing administration indices and aliases on the fly when an indexed entity is written, instead of relying on `bin/console es:admin:index`. Enable it in environments where nobody runs CLI commands after installing an extension or replacing the search cluster. It adds one alias check per indexer on every write, and an index created this way stays empty until a full reindex, so prefer `0` together with `bin/console es:admin:index` in your deployment pipeline. +::: + Also, the CLI commands can be used as below: ```bash