Uploaded image for project: 'Elasticsearch'
  1. Elasticsearch
  2. ELASTIC-17

Add supportfor current ES versions (7.x, 8.x)

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Major
    • None
    • 1.0.0
    • None
    • Java 11
      Magnolia 6.2.x
      Elastic 7.x, especially 7.14 and newer

    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

      • provide the REST API configuration within our webapp resources at /elastic-configuration/elastic-api/<version>
      • add a UpdateTask that sets the missing include_type_name parameter to the create index request path
      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")    ); 
      
      

       

      • Note that this fix only works for ES version < 7.14

       

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              wolf.bubenik wolf bubenik
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:

                Checklists

                  Task DoD