{"record":{"id":"da1a9ae0b72a80f1","repo":"quickwit-oss/quickwit","slug":"document-clustering-path-must-not-contain-e","errorCode":null,"errorMessage":"document clustering path `{:?}` must not contain empty components","messagePattern":"document clustering path `(.+?)` must not contain empty components","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-config/src/docs_clustering.rs","lineNumber":171,"sourceCode":"        serializer.serialize_str(&self.0.join(JSON_PATH_SEPARATOR))\n    }\n}\n\nimpl<'de> Deserialize<'de> for JsonPath {\n    fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>\n    where D: Deserializer<'de> {\n        let path = String::deserialize(deserializer)?;\n        let json_path: Box<[String]> = path\n            .split(JSON_PATH_SEPARATOR)\n            .map(ToString::to_string)\n            .collect();\n        Ok(Self(json_path))\n    }\n}\n\nimpl JsonPath {\n    fn validate(&self) -> anyhow::Result<()> {\n        ensure!(\n            !self.iter().any(|path_component| path_component.is_empty()),\n            \"document clustering path `{:?}` must not contain empty components\",\n            self\n        );\n        ensure!(\n            !self\n                .iter()\n                .any(|path_component| path_component.trim() != path_component),\n            \"document clustering path `{:?}` must not contain leading or trailing whitespace\",\n            self\n        );\n        Ok(())\n    }\n}\n\nimpl Deref for JsonPath {\n    type Target = [String];\n","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-config/src/docs_clustering.rs#L153-L189","documentation":"JsonPath::validate for doc clustering rejects paths containing empty components, e.g. a field path like `a..b` or a leading/trailing dot. Empty path components would resolve to nothing and indicate a malformed field path.","triggerScenarios":"Declaring a clustering method whose `field` path contains `..`, a leading `.`, or a trailing `.` (or a segment that is an empty string in the structured path form), validated via policy.validate() during config build.","commonSituations":"Hand-editing YAML dotted paths and leaving double dots; string concatenation to build paths in scripts (`prefix + \".\" + suffix` with empty suffix); copy-paste from JSON pointer syntax with wrong separators.","solutions":["Fix the path to have non-empty segments separated by single dots, e.g. `attributes.service.name` instead of `attributes..service.name`.","Strip leading/trailing dots from the field path.","If the path is built programmatically, filter or join segments that skip empty strings: `parts.filter(|p| !p.is_empty()).join(\".\")`."],"exampleFix":"# before\n- field: log..message\n# after\n- field: log.message","handlingStrategy":"validation","validationCode":"function hasNoEmptyComponents(path) {\n  return String(path).split('.').every(seg => seg.length > 0);\n}\n// apply to every clustering method field path","typeGuard":"const isValidPath = (p) => typeof p === 'string' && p.length > 0 && !p.startsWith('.') && !p.endsWith('.') && !p.includes('..');","tryCatchPattern":null,"preventionTips":["Join path segments with a helper that skips empty strings instead of raw string concatenation.","Never hand-type double dots in dotted field paths; validate with a regex like /^[^\\.]+(\\.[^\\.]+)*$/.","Copy dotted paths from the index schema mapping, not by hand."],"tags":["config","validation","json-path"],"backgroundTag":"invalid-argument-format","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}