{"record":{"id":"86bde8e21399bf79","repo":"quickwit-oss/quickwit","slug":"timestamp-field-timestamp-field-path-should-no-86bde8","errorCode":null,"errorMessage":"timestamp field `{timestamp_field_path}` should not end with a `.`","messagePattern":"timestamp field `(.+?)` should not end with a `\\.`","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-doc-mapper/src/doc_mapper/doc_mapper_impl.rs","lineNumber":109,"sourceCode":"    /// Maximum number of partitions\n    max_num_partitions: NonZeroU32,\n    /// Defines how unmapped fields should be handle.\n    mode: Mode,\n    /// User-defined tokenizers.\n    tokenizer_entries: Vec<TokenizerEntry>,\n    /// Tokenizer manager.\n    tokenizer_manager: TokenizerManager,\n}\n\nfn validate_timestamp_field(\n    timestamp_field_path: &str,\n    mapping_root_node: &MappingNode,\n) -> anyhow::Result<()> {\n    if timestamp_field_path.starts_with('.') || timestamp_field_path.starts_with(\"\\\\.\") {\n        bail!(\"timestamp field `{timestamp_field_path}` should not start with a `.`\");\n    }\n    if timestamp_field_path.ends_with('.') {\n        bail!(\"timestamp field `{timestamp_field_path}` should not end with a `.`\");\n    }\n    let Some(timestamp_field_type) =\n        mapping_root_node.find_field_mapping_type(timestamp_field_path)\n    else {\n        bail!(\"could not find timestamp field `{timestamp_field_path}` in field mappings\");\n    };\n    if let FieldMappingType::DateTime(date_time_option, cardinality) = &timestamp_field_type {\n        if cardinality != &Cardinality::SingleValued {\n            bail!(\"timestamp field `{timestamp_field_path}` should be single-valued\");\n        }\n        if !date_time_option.fast {\n            bail!(\"timestamp field `{timestamp_field_path}` should be a fast field\");\n        }\n    } else {\n        bail!(\"timestamp field `{timestamp_field_path}` should be a datetime field\");\n    }\n    Ok(())\n}","sourceCodeStart":91,"sourceCodeEnd":127,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-doc-mapper/src/doc_mapper/doc_mapper_impl.rs#L91-L127","documentation":"The mirror check of error 64: `validate_timestamp_field` rejects a `timestamp_field` path that ends with a `.`. A trailing dot cannot terminate a valid field name, so the DocMapper builder bails during `try_from`.","triggerScenarios":"Calling `DocMapperBuilder::try_from` with `doc_mapping.timestamp_field` ending in `.` (e.g. `\"timestamp.\"`), typically from concatenating path segments incorrectly.","commonSituations":"Programmatic config generation joining keys with `.` and leaving a trailing separator; copy-paste artifacts in index config YAML; template rendering issues in config tooling.","solutions":["Strip the trailing `.` from `timestamp_field` in the index config.","Fix the path-joining code/config template so it does not append a separator after the final segment.","Validate the index config before applying it."],"exampleFix":"// before\ndoc_mapping:\n  timestamp_field: \"event.\"\n// after\ndoc_mapping:\n  timestamp_field: \"event.time\"","handlingStrategy":"validation","validationCode":"const ts = config.doc_mapping.timestamp_field;\nif (typeof ts === 'string' && ts.endsWith('.')) {\n  throw new Error(`timestamp_field \"${ts}\" must not end with a dot`);\n}","typeGuard":"fn is_valid_trailing_path(p: &str) -> bool { !p.ends_with('.') }","tryCatchPattern":"match DocMapperBuilder::try_from(config) {\n    Ok(dm) => Ok(dm),\n    Err(e) if e.to_string().contains(\"should not end with\") => Err(ConfigError::InvalidTimestampField(e.to_string())),\n    Err(e) => Err(e.into()),\n}","preventionTips":["Trim separators when joining path segments programmatically.","Lint index configs for trailing dots in field paths.","Copy paths from the mapping definition, not by hand."],"tags":["doc-mapping","config-validation","timestamp","field-path"],"backgroundTag":"invalid-config-value","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"}