You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Mappings has been changed for the index aspire-identitycache in version 5.2. The action you must take depends on the need to preserve existing data:

  • No need to preserve existing data
  • Convert existing data

In all code blocks below Kibana is expected to be used for sending requests to Elasticsearch.

No need to preserve existing data

In that case simply delete existing index after stopping Aspire. When you start Aspire 5.2 version the index will be automatically created with the existing mapping.

DELETE aspire-identitycache

Convert existing data

  1. create new index aspire-identitycache_new with new 5.2 mapping: 

    PUT aspire-identitycache_new
    {
        "mappings": {
          "properties": {
            "identity.seedId": {
              "type": "keyword"
            },
            "identity.timestamp": {
              "type": "keyword"
            }
          },
          "dynamic_templates": [
            {
              "all_as_keyword": {
                "match_mapping_type": "*",
                "path_match": "identity.attributes.*",
                "mapping": {
                  "type": "keyword"
                }
              }
            },
            {
              "date_to_string": {
                "match_mapping_type": "date",
                "mapping": {
                  "type": "text"
                }
              }
            },
            {
              "boolean_to_string": {
                "match_mapping_type": "boolean",
                "mapping": {
                  "type": "text"
                }
              }
            },
            {
              "long_to_string": {
                "match_mapping_type": "long",
                "mapping": {
                  "type": "text"
                }
              }
            },
            {
              "double_to_string": {
                "match_mapping_type": "double",
                "mapping": {
                  "type": "text"
                }
              }
            },
            {
              "binary_to_string": {
                "match_mapping_type": "binary",
                "mapping": {
                  "type": "text"
                }
              }
            }
          ]
        }
      }
  • No labels