quickwit-oss/quickwit · error

Facets are not supported by quickwit at the moment.

Error message

Facets are not supported by quickwit at the moment.

What it means

A field mapped with the `facet` type reached the type-name serialization helper `primitive_type_to_str`, which has no string representation for `Type::Facet`; the macro panics because facet support is simply not implemented in Quickwit. It fires whenever a facet-typed field in the doc mapping is converted to its type identifier string (via to_type_id), not at mapping parse time.

Source

Thrown at quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_type.rs:139

        "bytes" => Some(Type::Bytes),
        "json" => Some(Type::Json),
        _unknown_type => None,
    }
}

fn primitive_type_to_str(primitive_type: &Type) -> &'static str {
    match primitive_type {
        Type::Str => "text",
        Type::U64 => "u64",
        Type::I64 => "i64",
        Type::F64 => "f64",
        Type::Bool => "bool",
        Type::IpAddr => "ip",
        Type::Date => "datetime",
        Type::Bytes => "bytes",
        Type::Json => "json",
        Type::Facet => {
            unimplemented!("Facets are not supported by quickwit at the moment.")
        }
        // Quickwit mappings cannot construct custom field types.
        Type::Custom => unimplemented!("custom fields are not supported in Quickwit"),
    }
}

#[cfg(test)]
mod tests {
    use tantivy::schema::Type;

    use super::QuickwitFieldType;

    #[track_caller]
    fn test_parse_type_aux(type_str: &str, expected: Option<QuickwitFieldType>) {
        let quickwit_field_type = QuickwitFieldType::parse_type_id(type_str);
        assert_eq!(quickwit_field_type, expected);
    }

View on GitHub (pinned to a39730c5cd)

Solutions

  1. Remove the facet-typed field from the index doc mapping and use a text field with the raw tokenizer or a u64/i64 field instead
  2. Search or aggregate on a supported primitive type (text, u64, i64, f64, bool, ip, datetime, bytes, json)
Defensive patterns

Strategy: type-guard

When it happens

Trigger: Thrown at quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_type.rs:139 when the library encounters an invalid state.

Common situations: See trigger scenarios.


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