quickwit-oss/quickwit · error
tags collection is not allowed on `bytes` fields
Error message
tags collection is not allowed on `bytes` fields
What it means
Tag collection (tag_fields-based term extraction) is only supported for fields whose values can be rendered as string tags. `bytes` fields are explicitly disallowed because binary values do not make usable tags, so `try_extract_terms` refuses them.
Source
Thrown at quickwit/quickwit-indexing/src/actors/packager.rs:253
for inv_index in inv_indexes {
let mut terms_streamer = inv_index.terms().stream()?;
while let Some((term_data, _)) = terms_streamer.next() {
let term = match named_field.field_type {
FieldType::U64(_) => u64_from_term_data(term_data)?.to_string(),
FieldType::I64(_) => {
tantivy::u64_to_i64(u64_from_term_data(term_data)?).to_string()
}
FieldType::F64(_) => {
tantivy::u64_to_f64(u64_from_term_data(term_data)?).to_string()
}
FieldType::Bool(_) => match u64_from_term_data(term_data)? {
0 => false,
1 => true,
_ => bail!("invalid boolean value"),
}
.to_string(),
FieldType::Bytes(_) => {
bail!("tags collection is not allowed on `bytes` fields")
}
_ => std::str::from_utf8(term_data)?.to_string(),
};
terms.push(term);
}
}
Ok(terms)
}
fn create_packaged_split(
index_meta: &IndexMeta,
split: IndexedSplit,
tag_fields: &[NamedField],
ctx: &ActorContext<Packager>,
) -> anyhow::Result<PackagedSplit> {
debug!(split_id = %split.split_id(), "create-packaged-split");
let split_files = list_split_files(index_meta, &split.split_scratch_directory)?;
View on GitHub (pinned to a39730c5cd)
Solutions
- Remove the bytes field from `tag_fields` in the index config.
- If the bytes field actually holds text, change its schema type to a string type.
- Add a separate string field (e.g. hex/base64 encoding) for tagging instead of tagging the raw bytes.
Example fix
// before (index config) tag_fields: ["raw_payload"] // raw_payload: bytes // after tag_fields: ["service"]
Defensive patterns
Strategy: validation
Validate before calling
// validate tag_fields against the schema before applying an index config
fn validate_tag_fields(schema: &Schema, tag_fields: &[String]) -> Result<(), String> {
for f in tag_fields {
if matches!(schema.get_field(f).unwrap().field_type(), FieldType::Bytes(_)) {
return Err(format!("tag field '{}' cannot be bytes", f));
}
}
Ok(())
} Prevention
- Cross-check tag_fields against the doc mapping schema at config-load time.
- Exclude bytes/binary fields from tag_fields; tag a derived string field instead.
- Update tag_fields whenever a field's type changes to bytes.
When it happens
Trigger: Packaging a split where a `tag_fields`-listed field has schema type `bytes` during `create_packaged_split`.
Common situations: Misconfigured `tag_fields` that includes a bytes field (e.g. a raw payload or binary id); schema type changed to bytes after tag fields were configured.
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
- number of unique terms for tag field {} > {}
- invalid boolean value
- Facet are not supported in quickwit yet.
- index ID pattern `{pattern}` is invalid: patterns must not c
- index ID pattern `{pattern}` is invalid: an index ID must ha
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/72f33e60660f9eca.
Report an issue: GitHub.