quickwit-oss/quickwit · error · anyhow::Error
timestamp field `{timestamp_field_path}` should be a fast fi
Error message
timestamp field `{timestamp_field_path}` should be a fast field What it means
For efficient range queries and pruning by time, the timestamp field must be stored as a fast (columnar) field. If the datetime field's `fast` option is false, `validate_timestamp_field` bails during DocMapper construction.
Source
Thrown at quickwit/quickwit-doc-mapper/src/doc_mapper/doc_mapper_impl.rs:121
mapping_root_node: &MappingNode,
) -> anyhow::Result<()> {
if timestamp_field_path.starts_with('.') || timestamp_field_path.starts_with("\\.") {
bail!("timestamp field `{timestamp_field_path}` should not start with a `.`");
}
if timestamp_field_path.ends_with('.') {
bail!("timestamp field `{timestamp_field_path}` should not end with a `.`");
}
let Some(timestamp_field_type) =
mapping_root_node.find_field_mapping_type(timestamp_field_path)
else {
bail!("could not find timestamp field `{timestamp_field_path}` in field mappings");
};
if let FieldMappingType::DateTime(date_time_option, cardinality) = ×tamp_field_type {
if cardinality != &Cardinality::SingleValued {
bail!("timestamp field `{timestamp_field_path}` should be single-valued");
}
if !date_time_option.fast {
bail!("timestamp field `{timestamp_field_path}` should be a fast field");
}
} else {
bail!("timestamp field `{timestamp_field_path}` should be a datetime field");
}
Ok(())
}
impl From<DocMapper> for DocMapperBuilder {
fn from(default_doc_mapper: DocMapper) -> Self {
let partition_key_str = default_doc_mapper.partition_key.to_string();
let partition_key_opt: Option<String> = if !partition_key_str.is_empty() {
Some(partition_key_str)
} else {
None
};
let doc_mapping = DocMapping {
doc_mapping_uid: default_doc_mapper.doc_mapping_uid,
mode: default_doc_mapper.mode,View on GitHub (pinned to a39730c5cd)
Solutions
- Set `fast: true` in the datetime field's indexing options in the doc mapping.
- Or pick another single-valued, fast datetime field as `timestamp_field`.
- Note this changes the index schema: apply to new indexes or re-index existing data.
Example fix
// before
doc_mapping:
field_mappings:
- name: ts
type: datetime
fast: false
timestamp_field: "ts"
// after
doc_mapping:
field_mappings:
- name: ts
type: datetime
fast: true
timestamp_field: "ts" Defensive patterns
Strategy: validation
Validate before calling
const f = findField(cfg.doc_mapping.field_mappings, cfg.doc_mapping.timestamp_field);
if (f && f.type === 'datetime' && f.fast !== true) {
throw new Error(`timestamp_field "${f.name}" must have fast: true`);
} Try / catch
match DocMapperBuilder::try_from(config) {
Ok(dm) => Ok(dm),
Err(e) if e.to_string().contains("should be a fast field") => Err(ConfigError::InvalidTimestampField(e.to_string())),
Err(e) => Err(e.into()),
} Prevention
- Set fast: true on any field used as timestamp_field.
- Never strip fast fields from the timestamp field to save space.
- Include this check in index-config CI validation.
When it happens
Trigger: Calling `DocMapperBuilder::try_from` with a timestamp_field whose datetime mapping sets `fast: false` (or omits the index-field-options making it non-fast).
Common situations: Users disabling fast fields to save disk space without realizing the timestamp field is required to be fast; copying field definitions from non-timestamp fields; older configs written before the fast requirement was enforced.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- timestamp field `{timestamp_field_path}` should not start wi
- timestamp field `{timestamp_field_path}` should not end with
- could not find timestamp field `{timestamp_field_path}` in f
- timestamp field `{timestamp_field_path}` should be single-va
- timestamp field `{timestamp_field_path}` should be a datetim
AI-assisted analysis of quickwit-oss/quickwit@a39730c5cd (2026-09-08).
Data as JSON: /api/errors/9aa5832635bdb22b.
Report an issue: GitHub.