quickwit-oss/quickwit · error
fast field is not allowed for array<bytes>
Error message
fast field is not allowed for array<bytes>
What it means
Bytes fields can be configured as fast columns for scalar (single-valued) fields, but a fast bytes column is not allowed for arrays (cardinality MultiValued). The deserializer rejects `type: array<bytes>` with `fast: true` to avoid an unsupported fast-field layout.
Source
Thrown at quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_entry.rs:779
}
Type::Bool => {
let bool_options: QuickwitBoolOptions = serde_json::from_value(json)?;
Ok(FieldMappingType::Bool(bool_options, cardinality))
}
Type::IpAddr => {
let ip_addr_options: QuickwitIpAddrOptions = serde_json::from_value(json)?;
Ok(FieldMappingType::IpAddr(ip_addr_options, cardinality))
}
Type::Date => {
let date_time_options = serde_json::from_value::<QuickwitDateTimeOptions>(json)?;
Ok(FieldMappingType::DateTime(date_time_options, cardinality))
}
Type::Facet => unimplemented!("Facet are not supported in quickwit yet."),
Type::Custom => bail!("custom fields are not supported in Quickwit"),
Type::Bytes => {
let numeric_options: QuickwitBytesOptions = serde_json::from_value(json)?;
if numeric_options.fast && cardinality == Cardinality::MultiValued {
bail!("fast field is not allowed for array<bytes>");
}
Ok(FieldMappingType::Bytes(numeric_options, cardinality))
}
Type::Json => {
let json_options: QuickwitJsonOptions = serde_json::from_value(json)?;
Ok(FieldMappingType::Json(json_options, cardinality))
}
}
}
impl TryFrom<FieldMappingEntryForSerialization> for FieldMappingEntry {
type Error = String;
fn try_from(value: FieldMappingEntryForSerialization) -> Result<Self, String> {
validate_field_mapping_name(&value.name).map_err(|err| err.to_string())?;
let quickwit_field_type =
QuickwitFieldType::parse_type_id(&value.type_id).ok_or_else(|| {
format!(View on GitHub (pinned to a39730c5cd)
Solutions
- Set `fast: false` for the array<bytes> field, or drop the `fast` key.
- Change the field to single-valued `bytes` if you truly need a fast bytes column.
- If you need fast access to multiple byte values, store them as separate fields or use a json field instead.
Example fix
// before
{name: "payload", type: "array<bytes>", fast: true}
// after
{name: "payload", type: "array<bytes>"} Defensive patterns
Strategy: validation
Validate before calling
fn bytes_fast_allowed(f: &serde_json::Value) -> bool {
let is_array_bytes = f.get("type").and_then(|t| t.as_str()) == Some("array<bytes>");
let fast = f.get("fast").and_then(|v| v.as_bool()) == Some(true);
!(is_array_bytes && fast)
} Try / catch
match create_index_result {
Err(e) if e.to_string().contains("fast field is not allowed for array<bytes>") => {
eprintln!("Disable fast on array<bytes> fields");
}
other => other?,
} Prevention
- Apply `fast: true` only to scalar numeric/date/bytes fields, not array types.
- Centralize which field types may be fast in your mapping generator.
- Test index configs against validation before cluster rollout.
When it happens
Trigger: Field mapping `{name: "blob", type: "array<bytes>", fast: true}` — the Bytes arm of from_json bails when fast is set on a multivalued bytes field.
Common situations: Users enabling `fast` on byte-array fields expecting aggregation/filtering on byte arrays; templates that set fast:true on all fields regardless of type/cardinality.
Related errors
- object type must have at least one field mapping
- concatenate type must have at least one sub-field
- field name `{field_mapping_name}` is reserved. the following
- `record`, `tokenizer`, and `fieldnorms` parameters are allow
- `record` and `tokenizer` parameters are allowed only if inde
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/50bb614109a2c88e.
Report an issue: GitHub.