elastic/elasticsearch · error · ElasticsearchException
Error trying to create multifield_stats results from stream
Error message
Error trying to create multifield_stats results from stream input
What it means
Error "Error trying to create multifield_stats results from stream input" thrown in elastic/elasticsearch.
Source
Thrown at modules/aggregations/src/main/java/org/elasticsearch/aggregations/metric/MatrixStatsResults.java:65
MatrixStatsResults(RunningStats stats, SamplingContext samplingContext) {
this.results = stats.clone();
this.correlation = new HashMap<>();
this.compute();
// Note: it is important to scale counts AFTER compute as scaling before could introduce bias
this.results.docCount = samplingContext.scaleUp(this.results.docCount);
for (String field : this.results.counts.keySet()) {
this.results.counts.computeIfPresent(field, (k, v) -> samplingContext.scaleUp(v));
}
}
/** creates a results object from the given stream */
@SuppressWarnings("unchecked")
protected MatrixStatsResults(StreamInput in) {
try {
results = new RunningStats(in);
correlation = (Map<String, HashMap<String, Double>>) in.readGenericValue();
} catch (IOException e) {
throw new ElasticsearchException("Error trying to create multifield_stats results from stream input", e);
}
}
/** Marshalls MatrixStatsResults */
@Override
public void writeTo(StreamOutput out) throws IOException {
// marshall results
results.writeTo(out);
// marshall correlation
out.writeGenericValue(correlation);
}
/** return document count */
public final long getDocCount() {
return results.docCount;
}
/** return the field counts - not public, used for getProperty() */View on GitHub (pinned to db6a809a66)
When it happens
Trigger: Thrown at modules/aggregations/src/main/java/org/elasticsearch/aggregations/metric/MatrixStatsResults.java:65 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/1d23e04727cf72e9.
Report an issue: GitHub.