[ELASTIC-17] Add supportfor current ES versions (7.x, 8.x) Created: 18/Jan/22 Updated: 18/Jan/22 |
|
| Status: | Open |
| Project: | Elasticsearch |
| Component/s: | None |
| Affects Version/s: | 1.0.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major |
| Reporter: | wolf bubenik | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Java 11 |
||
| Template: |
|
| Acceptance criteria: |
[ ]*
Creating index and mappings works for current ES versions that do not support he mapping type any more.
|
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
| Description |
|
The magnolia-es-configuration module contains ES API configs from version 6.0 to 7.3. As default it uses version 6.0.Using this default with new ES servers (7.13) causes errors on some REST calls. For instance the indexing of new documents fails with an error. API configs for newer versions are missing in the module setup. In these old versions the mapping supports a mapping type, that has been removed in versions 7.00 and newer. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/removal-of-types.html When using ES with version 7.x we have to add the parameter "include_type_name=true" to the create index request path to be backward compatible. If missing we get an exception and the index cannot be created with a mapping. If we create the index without mapping we get the exception when adding a document to the index. The create index request template can be found in the "query-manager" workspace at "/requests/standard/index/create". As a workaround you may
private Task _patchCreateIndexPath = new NodeBuilderTask( "Patch for requests.standard.index.create", "", ErrorHandling.logging, "query-manager", "/requests/standard/index/create", addOrSetProperty("path", "/{index}?include_type_name=true") );
|