{"record":{"id":"2b7f3e732b9c289d","repo":"quickwit-oss/quickwit","slug":"not-yet-implemented","errorCode":null,"errorMessage":"not yet implemented","messagePattern":"not yet implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-query/src/query_ast/range_query.rs","lineNumber":204,"sourceCode":"                FastFieldRangeQuery::new(\n                    lower_bound.map(|val| Term::from_field_date(field, val)),\n                    upper_bound.map(|val| Term::from_field_date(field, val)),\n                )\n                .into()\n            }\n            tantivy::schema::FieldType::Facet(_) => {\n                return Err(InvalidQuery::RangeQueryNotSupportedForField {\n                    value_type: \"facet\",\n                    field_name: field_entry.name().to_string(),\n                });\n            }\n            tantivy::schema::FieldType::Custom(_) => {\n                return Err(InvalidQuery::RangeQueryNotSupportedForField {\n                    value_type: \"custom\",\n                    field_name: field_entry.name().to_string(),\n                });\n            }\n            tantivy::schema::FieldType::Bytes(_) => todo!(),\n            tantivy::schema::FieldType::JsonObject(options) => {\n                let mut sub_queries: Vec<TantivyQueryAst> = Vec::new();\n                let empty_term =\n                    Term::from_field_json_path(field, json_path, options.is_expand_dots_enabled());\n                // Try to convert the bounds into numerical values in following order i64, u64,\n                // f64. Tantivy will convert to the correct numerical type of the column if it\n                // doesn't match.\n                let bounds_range_i64: Option<(Bound<i64>, Bound<i64>)> =\n                    convert_bound(&self.lower_bound).zip(convert_bound(&self.upper_bound));\n                let bounds_range_u64: Option<(Bound<u64>, Bound<u64>)> =\n                    convert_bound(&self.lower_bound).zip(convert_bound(&self.upper_bound));\n                let bounds_range_f64: Option<(Bound<f64>, Bound<f64>)> =\n                    convert_bound(&self.lower_bound).zip(convert_bound(&self.upper_bound));\n                if let Some(range) = bounds_range_i64 {\n                    sub_queries.push(query_from_fast_val_range(&empty_term, range).into());\n                } else if let Some(range) = bounds_range_u64 {\n                    sub_queries.push(query_from_fast_val_range(&empty_term, range).into());\n                } else if let Some(range) = bounds_range_f64 {","sourceCodeStart":186,"sourceCodeEnd":222,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-query/src/query_ast/range_query.rs#L186-L222","documentation":"build_tantivy_ast_impl for RangeQuery hits a `todo!()` when the target field is of tantivy FieldType::Bytes: converting a range query over a bytes fast-field into a tantivy AST is simply not implemented yet. The panic message is Rust's default \"not yet implemented\".","triggerScenarios":"Executing a range query (`range: {field: {gte/gt/lt/lte: ...}}`) against a field mapped as `bytes` in the index config.","commonSituations":"Users assuming byte fields support range filtering like numeric fields; queries generated by dashboards or ES-compat clients over binary columns.","solutions":["Do not issue range queries on bytes fields — filter on a numeric, date, or ip field instead.","Validate the query against the field's type at parse time and return InvalidQuery (like the Custom branch) rather than reaching the todo!().","Wait for/implement bytes range support upstream in the quickwit-query crate."],"exampleFix":"// before\ntantivy::schema::FieldType::Bytes(_) => todo!(),\n// after\ntantivy::schema::FieldType::Bytes(_) => {\n    return Err(InvalidQuery::RangeQueryNotSupportedForField {\n        value_type: \"bytes\",\n        field_name: field_entry.name().to_string(),\n    });\n}","handlingStrategy":"validation","validationCode":"if field_type == \"bytes\" && query_has_range_predicate {\n    return Err(\"range queries are not supported on bytes fields\".into());\n}","typeGuard":"fn is_bytes_field(schema: &Schema, field: &str) -> bool {\n    schema.get_field(field)\n        .and_then(|f| schema.get_field_entry(f).field_type().try_into().ok())\n        .map(|t| t.is_bytes())\n        .unwrap_or(false)\n}","tryCatchPattern":"// replace todo! with typed error so callers can catch:\nmatch build_tantivy_ast(range_query) {\n    Err(InvalidQuery::RangeQueryNotSupportedForField { .. }) => /* 400 to client */,\n    Err(e) => return Err(e),\n    Ok(ast) => ast,\n}","preventionTips":["Check the index schema before building queries: only numeric/date/ip fields support range predicates.","Map bytes fields' filters to match-all or exact-match semantics, not ranges.","Handle RangeQueryNotSupportedForField errors in query-building tests."],"tags":["panic","todo","query","range-query","limitation"],"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"}