code: private void updateEntityTypeEntityWithNewAttributeEntity(
        String entity, String attribute, Entity attributeEntity) {
      EntityType entityEntity = dataService.getEntityType(entity);
      Iterable<Attribute> attributes = entityEntity.getOwnAllAttributes();
      entityEntity.set(
          ATTRIBUTES,
          stream(attributes)
              .map(att -> att.getName().equals(attribute) ? attributeEntity : att)
              .collect(Collectors.toList()));
      dataService.update(ENTITY_TYPE_META_DATA, entityEntity);
    }
docs: The attribute just got updated, but the entity does not know this yet. To reindex this document
  in elasticsearch, update it.
  
  @param entity name of the entity
  @param attribute the name of the attribute that got changed
  @param attributeEntity the entity of the attribute that got changed