{"record":{"id":"d804b7bb594b7bfe","repo":"quickwit-oss/quickwit","slug":"index-uri-cannot-be-updated-current-value-n","errorCode":null,"errorMessage":"`index_uri` cannot be updated, current value {}, new expected value {}","messagePattern":"`index_uri` cannot be updated, current value (.+?), new expected value (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/index_config/serialize.rs","lineNumber":86,"sourceCode":"/// default values will be used, not those of the current index config.\npub fn load_index_config_update(\n    config_format: ConfigFormat,\n    index_config_bytes: &[u8],\n    default_index_root_uri: &Uri,\n    current_index_config: &IndexConfig,\n) -> anyhow::Result<IndexConfig> {\n    let mut new_index_config = load_index_config_from_user_config(\n        config_format,\n        index_config_bytes,\n        default_index_root_uri,\n    )?;\n    ensure!(\n        current_index_config.index_id == new_index_config.index_id,\n        \"`index_id` in config file {} does not match updated `index_id` {}\",\n        current_index_config.index_id,\n        new_index_config.index_id\n    );\n    ensure!(\n        current_index_config.index_uri == new_index_config.index_uri,\n        \"`index_uri` cannot be updated, current value {}, new expected value {}\",\n        current_index_config.index_uri,\n        new_index_config.index_uri\n    );\n    let (updated_doc_mapping, _mutation_occurred) = prepare_doc_mapping_update(\n        new_index_config.doc_mapping,\n        &current_index_config.doc_mapping,\n        &new_index_config.search_settings,\n    )?;\n    new_index_config.doc_mapping = updated_doc_mapping;\n\n    Ok(new_index_config)\n}\n\nimpl IndexConfigForSerialization {\n    fn index_uri_or_fallback_to_default(\n        &self,","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/index_config/serialize.rs#L68-L104","documentation":"`load_index_config_update` also forbids changing an index's `index_uri` (the object storage location where splits are written). After parsing the updated config, it compares the new `index_uri` with the current one and fails with this message if they differ, because relocating an index's data directory via a config update is not supported.","triggerScenarios":"Calling `update_index` / `load_index_config_update` with a config file whose `index_uri` differs from the current index config's `index_uri`.","commonSituations":"Moving an index to a new bucket or path by editing `index_uri`; switching between local and object-storage URIs; copying a config from a differently-hosted environment.","solutions":["Revert `index_uri` in the config file to the current value","If migration is truly needed, create a new index at the new URI and re-index or copy data there","Check environment-specific config overlays (staging vs prod) for a wrong `index_uri`"],"exampleFix":"// before\nindex_uri: s3://new-bucket/indexes/my-index\n// after\nindex_uri: s3://original-bucket/indexes/my-index","handlingStrategy":"validation","validationCode":"fn ensure_index_uri_unchanged(current_uri: &str, new_config: &str) -> anyhow::Result<()> {\n    let new_uri = extract_index_uri(new_config)?;\n    if new_uri != current_uri {\n        anyhow::bail!(\n            \"config index_uri `{new_uri}` differs from current `{current_uri}`; \\\n             index_uri cannot be updated\"\n        );\n    }\n    Ok(())\n}","typeGuard":null,"tryCatchPattern":"match load_index_config_update(...) {\n    Err(e) if e.to_string().contains(\"`index_uri` cannot be updated\") => {\n        eprintln!(\"Revert index_uri in the config to the existing value.\");\n    }\n    other => other?,\n}","preventionTips":["Generate update payloads from the live index config so index_uri is preserved verbatim","Keep environment-specific storage settings out of index config updates","To move data, plan a re-index/copy into a new index instead of editing index_uri"],"tags":["config","indexing","storage"],"backgroundTag":"conflicting-config-options","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"}