{"record":{"id":"1c94840c23da3a60","repo":"elastic/elasticsearch","slug":"gap-policy-must-not-be-null","errorCode":null,"errorMessage":"[gap_policy] must not be null.","messagePattern":"\\[gap_policy\\] must not be null\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/aggregations/src/main/java/org/elasticsearch/aggregations/pipeline/MovFnPipelineAggregationBuilder.java","lineNumber":134,"sourceCode":"     * 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    }\n\n    /**\n     * Sets the gap policy to use for this aggregation.\n     */\n    public MovFnPipelineAggregationBuilder gapPolicy(GapPolicy gapPolicy) {\n        if (gapPolicy == null) {\n            throw new IllegalArgumentException(\"[\" + GAP_POLICY.getPreferredName() + \"] must not be null.\");\n        }\n        this.gapPolicy = gapPolicy;\n        return this;\n    }\n\n    /**\n     * Gets the gap policy to use for this aggregation.\n     */\n    public GapPolicy gapPolicy() {\n        return gapPolicy;\n    }\n\n    /**\n     * Returns the window size for this aggregation\n     */\n    public int getWindow() {\n        return window;\n    }","sourceCodeStart":116,"sourceCodeEnd":152,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/aggregations/src/main/java/org/elasticsearch/aggregations/pipeline/MovFnPipelineAggregationBuilder.java#L116-L152","documentation":"Error \"[gap_policy] must not be null.\" thrown in elastic/elasticsearch.","triggerScenarios":"Thrown at modules/aggregations/src/main/java/org/elasticsearch/aggregations/pipeline/MovFnPipelineAggregationBuilder.java:134 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-12T12:17:08.281Z"}