quickwit-oss/quickwit · error
subfield ` ` not supported inside a concatenate field
Error message
subfield `{}` not supported inside a concatenate field What it means
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.
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.
Example fix
// before concatenate: all: [title, timestamp] // after concatenate: all: [title, description]
Defensive patterns
Strategy: validation
Validate before calling
for sub in &concatenate_options.concatenate_fields {
if let Some(entry) = mapping.get(sub) {
if !entry.mapping_type.supported_for_concat() {
return Err(format!("field `{sub}` type not supported for concatenate"));
}
}
} Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
Background: Type mismatch errors: IllegalArgumentException, TypeError and type guards across 150 open-source libraries — this error's family across 150 libraries.
Related errors
- duplicated field definition
- `dynamic_mapping` is only allowed with mode=dynamic.
- expected LargeStringArray for service col page
- expected StringArray for service col page
- field name ` ` contains illegal characters. field names…
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/903977064ac472a4.
Report an issue: GitHub.
Appendix: source
Thrown at quickwit/quickwit-doc-mapper/src/doc_mapper/mapping_tree.rs:1060
// we only pushed Concatenate fields in `concatenate_fields`
unreachable!();
};
let name = &concatenate_field_entry.name;
if mapping_node.branches.contains_key(name) {
bail!("duplicated field definition `{}`", name);
}
let text_options: JsonObjectOptions = options.clone().into();
let field = schema.add_json_field(name, text_options);
for sub_field in &options.concatenate_fields {
for matched_field in
mapping_node
.find_field_mapping_leaf(sub_field)
.ok_or_else(|| {
anyhow::anyhow!("concatenate field uses an unknown field `{sub_field}`")
})?
{
if !matched_field.typ.supported_for_concat() {
bail!(
"subfield `{}` not supported inside a concatenate field",
sub_field
);
}
matched_field.concatenate.push(field);
}
}
if options.include_dynamic_fields {
concatenate_dynamic_fields.push(field);
}
}
Ok(MappingNodeRoot {
field_mappings: mapping_node,
concatenate_dynamic_fields,
})
}
fn get_numeric_options_for_bool_field(View on GitHub (pinned to a39730c5cd)