{"record":{"id":"7dd87adf9bea8b40","repo":"elastic/elasticsearch","slug":"format-must-not-be-null-or-an-empty-string","errorCode":null,"errorMessage":"[format] must not be null or an empty string.","messagePattern":"\\[format\\] must not be null or an empty string\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/aggregations/src/main/java/org/elasticsearch/aggregations/pipeline/MovFnPipelineAggregationBuilder.java","lineNumber":109,"sourceCode":"        shift = in.readInt();\n    }\n\n    @Override\n    protected void doWriteTo(StreamOutput out) throws IOException {\n        out.writeString(bucketsPathString);\n        script.writeTo(out);\n        out.writeOptionalString(format);\n        gapPolicy.writeTo(out);\n        out.writeInt(window);\n        out.writeInt(shift);\n    }\n\n    /**\n     * Sets the format to use on the output of this aggregation.\n     */\n    public MovFnPipelineAggregationBuilder format(String format) {\n        if (Strings.isNullOrEmpty(format)) {\n            throw new IllegalArgumentException(\"[\" + FORMAT.getPreferredName() + \"] must not be null or an empty string.\");\n        }\n        this.format = format;\n        return this;\n    }\n\n    /**\n     * Gets the format to use on the output of this aggregation.\n     */\n    public String format() {\n        return format;\n    }\n\n    protected DocValueFormat formatter() {\n        if (format != null) {\n            return new DocValueFormat.Decimal(format);\n        }\n        return DocValueFormat.RAW;\n    }","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/aggregations/src/main/java/org/elasticsearch/aggregations/pipeline/MovFnPipelineAggregationBuilder.java#L91-L127","documentation":"Error \"[format] must not be null or an empty string.\" thrown in elastic/elasticsearch.","triggerScenarios":"Thrown at modules/aggregations/src/main/java/org/elasticsearch/aggregations/pipeline/MovFnPipelineAggregationBuilder.java:109 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T08:17:17.861Z"}