You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The RollupActionConfig objects had validation of mappings, but
the TransportRollupAction never leveraged them to validate the
action. This commit introduces a new first step for validation
before continuing with the rollup.
validation exception messages had "... across all indices" removed
from the messages of RollupAction objects, but legacy objects were
left untouched since they still interact with index patterns and
RollupAction is always against one index.
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/rollup/RollupActionDateHistogramGroupConfig.java
+4-5Lines changed: 4 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -247,21 +247,20 @@ public void validateMappings(Map<String, Map<String, FieldCapabilities>> fieldCa
247
247
if (fieldCaps.get(dateType).isAggregatable()) {
248
248
return;
249
249
} else {
250
-
validationException.addValidationError("The field [" + field + "] must be aggregatable across all indices, " +
250
+
validationException.addValidationError("The field [" + field + "] must be aggregatable, " +
251
251
"but is not.");
252
252
}
253
253
}
254
254
}
255
255
if (matchesDateType == false) {
256
256
validationException.addValidationError("The field referenced by a date_histo group must be one of type [" +
257
-
Strings.collectionToCommaDelimitedString(RollupField.DATE_FIELD_MAPPER_TYPES) + "] across all " +
258
-
"indices in the index pattern. Found: " + fieldCaps.keySet().toString() + " for field [" + field + "]");
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/rollup/RollupActionDateHistogramGroupConfigSerializingTests.java
Copy file name to clipboardExpand all lines: x-pack/plugin/core/src/test/java/org/elasticsearch/xpack/core/rollup/RollupActionGroupConfigSerializingTests.java
0 commit comments