quickwit-oss/quickwit · error
invalid boolean value
Error message
invalid boolean value
What it means
When converting boolean tag terms, the packed u64 term data must be 0 (false) or 1 (true). Any other value is a corrupted or unexpected term encoding for a `bool` field, so `try_extract_terms` bails with this message.
Source
Thrown at quickwit/quickwit-indexing/src/actors/packager.rs:249
max_terms
);
}
let mut terms = Vec::with_capacity(num_terms);
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>,View on GitHub (pinned to a39730c5cd)
Solutions
- Inspect/repair the split's term dictionary; the term data is inconsistent with a bool field.
- Re-index the affected data into a fresh split to regenerate terms.
- Verify the index schema field type hasn't changed between split generations.
Defensive patterns
Strategy: validation
Validate before calling
fn is_valid_bool_term(v: u64) -> bool { matches!(v, 0 | 1) }
// call before term extraction if you control term building
if !is_valid_bool_term(raw) { return Err("corrupt bool term".into()); } Prevention
- Keep field types stable across an index's lifetime to avoid mixed encodings.
- Verify split integrity (checksums) if this error appears — it usually means corruption.
- Re-index data rather than merging splits from suspect sources.
When it happens
Trigger: Extracting terms for a tag field of type `bool` in `create_packaged_split` when `u64_from_term_data` yields a value other than 0 or 1 — indicating corrupted term storage or a type/encoding mismatch.
Common situations: Corrupted split files; schema drift where the field was previously another numeric type and old terms are decoded as bool; a tantivy version/encoding change.
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- number of unique terms for tag field {} > {}
- tags collection is not allowed on `bytes` fields
- failed to locate split footer after reading bundle metadata
- hot directory metadata's magic number does not match
- split is too short to contain a footer
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/0173d257c96fa68b.
Report an issue: GitHub.