{"record":{"id":"b5e41b3bfe456cee","repo":"quickwit-oss/quickwit","slug":"facet-are-not-supported-in-quickwit-yet","errorCode":null,"errorMessage":"Facet are not supported in quickwit yet.","messagePattern":"Facet are not supported in quickwit yet\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_entry.rs","lineNumber":774,"sourceCode":"            Ok(FieldMappingType::I64(numeric_options, cardinality))\n        }\n        Type::F64 => {\n            let numeric_options: QuickwitNumericOptions = serde_json::from_value(json)?;\n            Ok(FieldMappingType::F64(numeric_options, cardinality))\n        }\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","sourceCodeStart":756,"sourceCodeEnd":792,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-doc-mapper/src/doc_mapper/field_mapping_entry.rs#L756-L792","documentation":"When building field mapping entries from an index config, a mapping whose type is `facet` reaches an explicit unimplemented!(): facets are a Tantivy feature Quickwit has not implemented. Unlike `custom` fields (which produce a proper bail! error), facet mappings abort with a panic.","triggerScenarios":"Declaring `type: facet` in an index config field_mapping_entries and ingesting/creating the index, hitting Type::Facet in the type-deserialization match.","commonSituations":"Porting Tantivy-based configs to Quickwit; users copying facet examples from Tantivy docs; migrating configs from other search engines that support facets.","solutions":["Remove the `facet` field mapping and use a regular text/json field with hierarchical values instead.","Prefer storing hierarchical paths (e.g. '/a/b/c') in a text field and filtering with prefix queries.","File/upvote upstream support for facets in Quickwit."],"exampleFix":"// before\n\"category\": { \"type\": \"facet\" }\n// after\n\"category\": { \"type\": \"text\", \"tokenizer\": \"raw\" }","handlingStrategy":"validation","validationCode":"// validate index config before creating the index:\nfor (_name, entry) in &doc_mapping.field_mappings {\n    if entry_type_is(entry, \"facet\") {\n        return Err(\"facet fields are not supported in Quickwit\".into());\n    }\n}","typeGuard":null,"tryCatchPattern":"// replace the unimplemented! with bail! so config errors surface as 400s:\nType::Facet => bail!(\"facet fields are not supported in quickwit yet\"),","preventionTips":["Never use `type: facet` in Quickwit index configs; it is not a supported mapping type.","Model hierarchical categories as text fields with delimited paths and prefix queries.","Run `quickwit index create` against a validated config schema that rejects facet early."],"tags":["panic","unimplemented","schema","facets","config"],"backgroundTag":"operation-not-supported","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"}