elastic/elasticsearch · error · IllegalArgumentException
field {field} does not exist
Error message
field {field} does not exist What it means
Error "field {field} does not exist" thrown in elastic/elasticsearch.
Source
Thrown at modules/aggregations/src/main/java/org/elasticsearch/aggregations/metric/MatrixStatsResults.java:193
// fieldY exists as a col key to fieldX
return map.get(fieldX).get(fieldY);
} else {
// otherwise fieldX is the col key to fieldY
return map.get(fieldY).get(fieldX);
}
} else if (map.containsKey(fieldY)) {
// fieldX did not exist as a row key, it must be a col key
return map.get(fieldY).get(fieldX);
}
throw new IllegalArgumentException("Coefficient not computed between fields: " + fieldX + " and " + fieldY);
}
private static void checkField(String field, Map<String, ?> map) {
if (field == null) {
throw new IllegalArgumentException("field name cannot be null");
}
if (map.containsKey(field) == false) {
throw new IllegalArgumentException("field " + field + " does not exist");
}
}
/** Computes final covariance, variance, and correlation */
private void compute() {
final double nM1 = results.docCount - 1D;
// compute final skewness and kurtosis
for (String fieldName : results.means.keySet()) {
final double var = results.variances.get(fieldName);
// update skewness
results.skewness.put(fieldName, Math.sqrt(results.docCount) * results.skewness.get(fieldName) / Math.pow(var, 1.5D));
// update kurtosis
results.kurtosis.put(fieldName, (double) results.docCount * results.kurtosis.get(fieldName) / (var * var));
// update variances
results.variances.put(fieldName, results.variances.get(fieldName) / nM1);
}
// compute final covariances and correlationView on GitHub (pinned to db6a809a66)
When it happens
Trigger: Thrown at modules/aggregations/src/main/java/org/elasticsearch/aggregations/metric/MatrixStatsResults.java:193 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of elastic/elasticsearch@db6a809a66 (2026-08-12).
Data as JSON: /api/errors/3f74622a6fa3df2a.
Report an issue: GitHub.