quickwit-oss/quickwit · error

custom fields are not supported in Quickwit

Error message

custom fields are not supported in Quickwit

What it means

Tantivy supports a `Custom` field type, but Quickwit's mapping deserializer does not implement it. Any mapping that resolves to tantivy's Type::Custom is rejected with this message rather than silently ignored, since Quickwit cannot map, index, or search such fields.

Solutions

  1. Use one of Quickwit's supported field types (text, json, u64, i64, f64, bool, date, bytes, object, concatenate) instead.
  2. Remove the custom-typed field from the mapping.
  3. If you need that capability, check whether a newer Quickwit version supports the corresponding type.
Defensive patterns

Strategy: validation

Validate before calling

const SUPPORTED: &[&str] = &["text", "json", "u64", "i64", "f64", "bool", "date", "bytes", "object", "concatenate"];
fn field_type_supported(f: &serde_json::Value) -> bool {
    let t = f.get("type").and_then(|t| t.as_str()).unwrap_or("");
    SUPPORTED.contains(&t) || t.starts_with("array<") && SUPPORTED.contains(&t.trim_start_matches("array<").trim_end_matches('>'))
}

Prevention

When it happens

Trigger: Deserializing a FieldMappingType whose field type string maps to Type::Custom in the from_json match — practically only reachable if a type alias resolves to the custom variant; ordinary users cannot select it.

Common situations: Forward-porting mappings from other tantivy-based tools that use custom field types; hand-editing serialized schema JSON; future tantivy types surfacing as Custom in older Quickwit versions.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08). Data as JSON: /api/errors/273435355e569928. Report an issue: GitHub.

Appendix: source

Thrown at quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_entry.rs:775

        }
        Type::F64 => {
            let numeric_options: QuickwitNumericOptions = serde_json::from_value(json)?;
            Ok(FieldMappingType::F64(numeric_options, cardinality))
        }
        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> {

View on GitHub (pinned to a39730c5cd)