diff --git a/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java b/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java index 7dd392a1b16..de331f153c2 100644 --- a/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java +++ b/plugin/src/main/java/org/elasticsearch/license/XPackLicenseState.java @@ -71,6 +71,7 @@ public class XPackLicenseState { messages.put(XPackPlugin.WATCHER, XPackLicenseState::watcherAcknowledgementMessages); messages.put(XPackPlugin.MONITORING, XPackLicenseState::monitoringAcknowledgementMessages); messages.put(XPackPlugin.GRAPH, XPackLicenseState::graphAcknowledgementMessages); + messages.put(XPackPlugin.MACHINE_LEARNING, XPackLicenseState::machineLearningAcknowledgementMessages); messages.put(XPackPlugin.LOGSTASH, XPackLicenseState::logstashAcknowledgementMessages); ACKNOWLEDGMENT_MESSAGES = Collections.unmodifiableMap(messages); } @@ -177,6 +178,21 @@ public class XPackLicenseState { return Strings.EMPTY_ARRAY; } + private static String[] machineLearningAcknowledgementMessages(OperationMode currentMode, OperationMode newMode) { + switch (newMode) { + case BASIC: + case STANDARD: + case GOLD: + switch (currentMode) { + case TRIAL: + case PLATINUM: + return new String[] { "Machine learning will be disabled" }; + } + break; + } + return Strings.EMPTY_ARRAY; + } + private static String[] logstashAcknowledgementMessages(OperationMode currentMode, OperationMode newMode) { switch (newMode) { case BASIC: