{"record":{"id":"903977064ac472a4","repo":"quickwit-oss/quickwit","slug":"subfield-not-supported-inside-a-concatenate-f","errorCode":null,"errorMessage":"subfield `{}` not supported inside a concatenate field","messagePattern":"subfield `(.+?)` not supported inside a concatenate field","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-doc-mapper/src/doc_mapper/mapping_tree.rs","lineNumber":1060,"sourceCode":"            // we only pushed Concatenate fields in `concatenate_fields`\n            unreachable!();\n        };\n        let name = &concatenate_field_entry.name;\n        if mapping_node.branches.contains_key(name) {\n            bail!(\"duplicated field definition `{}`\", name);\n        }\n        let text_options: JsonObjectOptions = options.clone().into();\n        let field = schema.add_json_field(name, text_options);\n        for sub_field in &options.concatenate_fields {\n            for matched_field in\n                mapping_node\n                    .find_field_mapping_leaf(sub_field)\n                    .ok_or_else(|| {\n                        anyhow::anyhow!(\"concatenate field uses an unknown field `{sub_field}`\")\n                    })?\n            {\n                if !matched_field.typ.supported_for_concat() {\n                    bail!(\n                        \"subfield `{}` not supported inside a concatenate field\",\n                        sub_field\n                    );\n                }\n                matched_field.concatenate.push(field);\n            }\n        }\n        if options.include_dynamic_fields {\n            concatenate_dynamic_fields.push(field);\n        }\n    }\n    Ok(MappingNodeRoot {\n        field_mappings: mapping_node,\n        concatenate_dynamic_fields,\n    })\n}\n\nfn get_numeric_options_for_bool_field(","sourceCodeStart":1042,"sourceCodeEnd":1078,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-doc-mapper/src/doc_mapper/mapping_tree.rs#L1042-L1078","documentation":"A `concatenate` field listed a sub-field whose mapped type does not support concatenation (supported_for_concat() is false). Only certain leaf types (text-like fields) can feed a concatenate field, and the referenced field's type failed this test.","triggerScenarios":"build_mapping_tree with a concatenate field whose concatenate_fields list references, e.g., a u64/i64/datetime/bool field, or a json field that is not supported for concat.","commonSituations":"Adding numeric or date fields to a concatenate list expecting full-text search over them; copy-pasting an Elasticsearch copy_to config onto numeric fields; typos leading to the wrong field being matched.","solutions":["Remove the unsupported field from the concatenate field's concatenate_fields list.","Index that field additionally as text (via a second field or mapping change) if text search over it is required.","Check which types implement supported_for_concat and only list those (text-ish) fields."],"exampleFix":"// before\nconcatenate:\n  all: [title, timestamp]\n// after\nconcatenate:\n  all: [title, description]","handlingStrategy":"validation","validationCode":"for sub in &concatenate_options.concatenate_fields {\n    if let Some(entry) = mapping.get(sub) {\n        if !entry.mapping_type.supported_for_concat() {\n            return Err(format!(\"field `{sub}` type not supported for concatenate\"));\n        }\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Only list text-like fields in concatenate_fields.","Consult the supported_for_concat implementation before adding field types.","Index numeric/date fields separately if full-text search over them is needed."],"tags":["index-config","concatenate","type-mismatch"],"backgroundTag":"type-mismatch","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}