{"record":{"id":"50bb614109a2c88e","repo":"quickwit-oss/quickwit","slug":"fast-field-is-not-allowed-for-array-bytes","errorCode":null,"errorMessage":"fast field is not allowed for array<bytes>","messagePattern":"fast field is not allowed for array<bytes>","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_entry.rs","lineNumber":779,"sourceCode":"        }\n        Type::Bool => {\n            let bool_options: QuickwitBoolOptions = serde_json::from_value(json)?;\n            Ok(FieldMappingType::Bool(bool_options, cardinality))\n        }\n        Type::IpAddr => {\n            let ip_addr_options: QuickwitIpAddrOptions = serde_json::from_value(json)?;\n            Ok(FieldMappingType::IpAddr(ip_addr_options, cardinality))\n        }\n        Type::Date => {\n            let date_time_options = serde_json::from_value::<QuickwitDateTimeOptions>(json)?;\n            Ok(FieldMappingType::DateTime(date_time_options, cardinality))\n        }\n        Type::Facet => unimplemented!(\"Facet are not supported in quickwit yet.\"),\n        Type::Custom => bail!(\"custom fields are not supported in Quickwit\"),\n        Type::Bytes => {\n            let numeric_options: QuickwitBytesOptions = serde_json::from_value(json)?;\n            if numeric_options.fast && cardinality == Cardinality::MultiValued {\n                bail!(\"fast field is not allowed for array<bytes>\");\n            }\n            Ok(FieldMappingType::Bytes(numeric_options, cardinality))\n        }\n        Type::Json => {\n            let json_options: QuickwitJsonOptions = serde_json::from_value(json)?;\n            Ok(FieldMappingType::Json(json_options, cardinality))\n        }\n    }\n}\n\nimpl TryFrom<FieldMappingEntryForSerialization> for FieldMappingEntry {\n    type Error = String;\n\n    fn try_from(value: FieldMappingEntryForSerialization) -> Result<Self, String> {\n        validate_field_mapping_name(&value.name).map_err(|err| err.to_string())?;\n        let quickwit_field_type =\n            QuickwitFieldType::parse_type_id(&value.type_id).ok_or_else(|| {\n                format!(","sourceCodeStart":761,"sourceCodeEnd":797,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_entry.rs#L761-L797","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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."],"exampleFix":"// before\n{name: \"payload\", type: \"array<bytes>\", fast: true}\n// after\n{name: \"payload\", type: \"array<bytes>\"}","handlingStrategy":"validation","validationCode":"fn bytes_fast_allowed(f: &serde_json::Value) -> bool {\n    let is_array_bytes = f.get(\"type\").and_then(|t| t.as_str()) == Some(\"array<bytes>\");\n    let fast = f.get(\"fast\").and_then(|v| v.as_bool()) == Some(true);\n    !(is_array_bytes && fast)\n}","typeGuard":null,"tryCatchPattern":"match create_index_result {\n    Err(e) if e.to_string().contains(\"fast field is not allowed for array<bytes>\") => {\n        eprintln!(\"Disable fast on array<bytes> fields\");\n    }\n    other => other?,\n}","preventionTips":["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."],"tags":["schema","mapping","validation","rust"],"backgroundTag":"unsupported-config-value","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}