{"record":{"id":"40633b2691b7bdee","repo":"elastic/elasticsearch","slug":"missing-field-when-calculating-fingerprint","errorCode":null,"errorMessage":"missing field [{}] when calculating fingerprint","messagePattern":"missing field \\[(.+?)\\] when calculating fingerprint","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/FingerprintProcessor.java","lineNumber":89,"sourceCode":"        this.ignoreMissing = ignoreMissing;\n    }\n\n    @Override\n    @SuppressWarnings(\"unchecked\")\n    public IngestDocument execute(IngestDocument ingestDocument) throws Exception {\n        Hasher hasher = threadLocalHasher.get();\n        hasher.reset();\n        hasher.update(salt);\n\n        var values = new Stack<>();\n        for (int k = fields.size() - 1; k >= 0; k--) {\n            String field = fields.get(k);\n            Object value = ingestDocument.getFieldValue(field, Object.class, true);\n            if (value == null) {\n                if (ignoreMissing) {\n                    continue;\n                } else {\n                    throw new IllegalArgumentException(\"missing field [\" + field + \"] when calculating fingerprint\");\n                }\n            }\n            values.push(value);\n        }\n\n        if (values.size() > 0) {\n            // iteratively traverse document fields\n            while (values.isEmpty() == false) {\n                var value = values.pop();\n                if (value instanceof List<?> list) {\n                    for (int k = list.size() - 1; k >= 0; k--) {\n                        values.push(list.get(k));\n                    }\n                } else if (value instanceof Set) {\n                    @SuppressWarnings(\"rawtypes\")\n                    var set = (Set<Comparable>) value;\n                    // process set entries in consistent order\n                    var setList = new ArrayList<>(set);","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/elastic/elasticsearch/blob/db6a809a667c081ca1dc7500389d26975573215f/modules/ingest-common/src/main/java/org/elasticsearch/ingest/common/FingerprintProcessor.java#L71-L107","documentation":"Thrown by FingerprintProcessor.execute when one of the configured 'fields' is null/absent in the document and 'ignore_missing' is false (default). The processor iterates fields in reverse and calls getFieldValue with ignoreMissing=true so that absence returns null; if ignore_missing is false the null is an explicit fatal error. The hash cannot be computed for an incomplete field set.","triggerScenarios":"A fingerprint processor configured with a list of fields, where at least one field is null or absent in the incoming document, and 'ignore_missing' omitted or false.","commonSituations":"Optional fields included in the fingerprint key; field renamed upstream; pipelines shared across document types where some fields are absent; schema drift dropping a field from new documents.","solutions":["Set 'ignore_missing: true' on the fingerprint processor so missing fields are skipped rather than failing.","Ensure all listed fields are populated upstream, or add a 'set' processor to default them before fingerprinting.","Reduce the 'fields' list to fields guaranteed to be present, or split documents into separate pipelines keyed by type."],"exampleFix":"// before\n{\"fingerprint\": {\"fields\": [\"user\", \"event\", \"ts\"]}}\n// after\n{\"fingerprint\": {\"fields\": [\"user\", \"event\", \"ts\"], \"ignore_missing\": true}}","handlingStrategy":"validation","validationCode":"// Default ignore_missing on fingerprint for optional fields.\n{\"fingerprint\": {\"fields\": [\"user\", \"event\"], \"ignore_missing\": true}}","typeGuard":null,"tryCatchPattern":"{\"on_failure\": [{\"index\": {\"index\": \"ingest-dlq\"}}]}","preventionTips":["Use ignore_missing: true when any listed field may be absent.","Constrain the fields list to guaranteed-present keys.","Default missing keys with a set processor before fingerprint when a stable hash is required."],"tags":["ingest","fingerprint-processor","null-handling","config"],"backgroundTag":null,"analyzedSha":"db6a809a667c081ca1dc7500389d26975573215f","analyzedAt":"2026-08-12T01:39:14.192Z","schemaVersion":2},"datasetVersion":"2026-08-12T12:31:55.035Z"}