{"record":{"id":"f2a5500ffccca6b1","repo":"quickwit-oss/quickwit","slug":"updating-timestamp-field-is-not-allowed-current-t","errorCode":null,"errorMessage":"updating timestamp field is not allowed, current timestamp field `{}`, new timestamp field `{}`","messagePattern":"updating timestamp field is not allowed, current timestamp field `(.+?)`, new timestamp field `(.+?)`","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/index_config/mod.rs","lineNumber":736,"sourceCode":"    // mapping UID to compare the two doc mappings, ignoring their UIDs.\n    let new_doc_mapping_uid = new_doc_mapping.doc_mapping_uid;\n    new_doc_mapping.doc_mapping_uid = current_doc_mapping.doc_mapping_uid;\n\n    if new_doc_mapping == *current_doc_mapping {\n        return Ok((new_doc_mapping, false));\n    }\n    // Restore the new doc mapping UID.\n    new_doc_mapping.doc_mapping_uid = new_doc_mapping_uid;\n\n    ensure!(\n        new_doc_mapping.doc_mapping_uid != current_doc_mapping.doc_mapping_uid,\n        \"new doc mapping UID should differ from the current one, current UID `{}`, new UID `{}`\",\n        current_doc_mapping.doc_mapping_uid,\n        new_doc_mapping.doc_mapping_uid,\n    );\n    let new_timestamp_field = new_doc_mapping.timestamp_field.as_deref();\n    let current_timestamp_field = current_doc_mapping.timestamp_field.as_deref();\n    ensure!(\n        new_timestamp_field == current_timestamp_field,\n        \"updating timestamp field is not allowed, current timestamp field `{}`, new timestamp \\\n         field `{}`\",\n        current_timestamp_field.unwrap_or(\"none\"),\n        new_timestamp_field.unwrap_or(\"none\"),\n    );\n    // TODO: Unsure this constraint is required, should we relax it?\n    let new_tokenizers: HashSet<_> = new_doc_mapping.tokenizers.iter().collect();\n    let current_tokenizers: HashSet<_> = current_doc_mapping.tokenizers.iter().collect();\n    ensure!(\n        new_tokenizers.is_superset(&current_tokenizers),\n        \"updating tokenizers is allowed only if adding new tokenizers, current tokenizers \\\n         `{current_tokenizers:?}`, new tokenizers `{new_tokenizers:?}`\",\n    );\n    build_doc_mapper(&new_doc_mapping, search_settings).context(\"invalid doc mapping\")?;\n    Ok((new_doc_mapping, true))\n}\n","sourceCodeStart":718,"sourceCodeEnd":754,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/index_config/mod.rs#L718-L754","documentation":"The timestamp field is structural in Quickwit: it drives time partitioning, retention and pruning, so changing it would corrupt the mapping of existing splits. prepare_doc_mapping_update therefore enforces that the new mapping's timestamp_field is identical (including None) to the current one, failing with this error otherwise.","triggerScenarios":"update_index request whose new doc_mapping sets a different timestamp_field than the existing mapping, or adds/removes a timestamp field entirely.","commonSituations":"Trying to 'fix' a wrong timestamp field on a live index via update; renaming the timestamp column in the config; migrating an index from no timestamp to one (or the reverse).","solutions":["Keep timestamp_field unchanged in the update payload","If a different timestamp field is genuinely needed, create a new index (with the corrected mapping) and reindex/migrate the data","Remove the timestamp_field change from the submitted config and resubmit"],"exampleFix":"# before (update payload)\ndoc_mapping:\n  timestamp_field: new_ts\n# after\ndoc_mapping:\n  timestamp_field: original_ts   # must match the current index mapping","handlingStrategy":"validation","validationCode":"// Rust precheck\nassert_eq!(new_doc_mapping.timestamp_field, current_doc_mapping.timestamp_field, \"timestamp_field is immutable\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Treat timestamp_field as immutable after index creation","Diff the new config against the current one and reject timestamp_field changes before submit","Plan reindexing into a new index when the timestamp field must change"],"tags":["config","schema","immutable-field","validation"],"backgroundTag":"unsupported-operation","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"}