Skip to content

Commit

Permalink
doc: EMSCO_DYNAMIC_MAPPING envvar & upgrade
Browse files Browse the repository at this point in the history
  • Loading branch information
theus77 committed Jan 3, 2024
1 parent 0ce0a14 commit f47a328
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 2 deletions.
15 changes: 15 additions & 0 deletions docs/elasticms-admin/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,21 @@ Define the default bulk size for commands such as the `ems:environment:rebuild`
```dotenv
EMSCO_DEFAULT_BULK_SIZE=500
```

### EMSCO_DYNAMIC_MAPPING
Define the default [dynamic mapping mode](https://www.elastic.co/guide/en/elasticsearch/reference/current/dynamic.html#dynamic-parameters) for the elasticsearch managed indexes. Default value: `'false'`.

This parameter has been introduced in version 6.0.0. Prior version were then using the elasticsearch default value `'false'`.

```dotenv
EMSCO_DEFAULT_BULK_SIZE='false'
```
Possible values are:
- `true`: New fields are added to the mapping.
- `runtime`: New fields are added to the mapping as [runtime fields](https://www.elastic.co/guide/en/elasticsearch/reference/current/runtime.html). These fields are not indexed, and are loaded from _source at query time.
- `false`: New fields are ignored. These fields will not be indexed or searchable, but will still appear in the _source field of returned hits. These fields will not be added to the mapping, and new fields must be added explicitly.
- `strict`: If new fields are detected, an exception is thrown and the document is rejected. New fields must be explicitly added to the mapping.


### EMS_BACKEND_URL
Define the url use by the user to access elasticms (in order to generate links in emails).
Expand Down
12 changes: 10 additions & 2 deletions docs/upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

## version 6.0.x

## Renamed embed methods in web/skeleton templates
### Renamed embed methods in web/skeleton templates

All controller methods have lost any trailing `Action`

Expand All @@ -28,13 +28,21 @@ E.g.:
} )) }}
```

## Routes removed
### Routes removed

* `template.index` must be replaced by `ems_core_action_index`
* `template.add` must be replaced by `ems_core_action_add`
* `template.edit` must be replaced by `ems_core_action_edit`
* `template.remove` must be replaced by `ems_core_action_delete`

### New dynamic mapping config which change the elasticsearch indexes

Before version 6 it was not possible to define elasticsearch dynamic mapping config. In other words, before version 6, every fields present in a document, that aren't strictly defined in the content type, a mapping was automatically guessed by elasticsearch.

Since version 6 the default dynamic mapping config has changed. New fields are ignored. These fields will not be indexed or searchable, but will still appear in the _source field of returned hits. These fields will not be added to the mapping, and new fields must be added explicitly into the content type.

You can reactivate the dynamic mapping with this environment variable: `EMSCO_DEFAULT_BULK_SIZE='true'`. But it's not recommended. Check the [EMSCO_DEFAULT_BULK_SIZE documentation](elasticms-admin/environment-variables.md#emscodynamicmapping)

## version 5.7.x

* Added twig function [ems_template_exists](./site-building/twig.md#ems_template_exists)
Expand Down

0 comments on commit f47a328

Please sign in to comment.